HHH-2616 : backed out of changes that provide the affected owner ID from collection events due to unit test failures
git-svn-id: https://svn.jboss.org/repos/hibernate/core/branches/Branch_3_2@14303 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
bc6708fcf6
commit
48154c5d84
|
@ -15,14 +15,11 @@ public abstract class AbstractCollectionEvent extends AbstractEvent {
|
|||
|
||||
private final PersistentCollection collection;
|
||||
private final Object affectedOwner;
|
||||
private final Serializable affectedOwnerId;
|
||||
|
||||
public AbstractCollectionEvent(PersistentCollection collection, EventSource source, Object affectedOwner) {
|
||||
super(source);
|
||||
this.collection = collection;
|
||||
this.affectedOwner = affectedOwner;
|
||||
this.affectedOwnerId =
|
||||
( ( SessionImplementor ) source ).getPersistenceContext().getEntry( affectedOwner ).getId();
|
||||
}
|
||||
|
||||
protected static Object getLoadedOwner( PersistentCollection collection, EventSource source ) {
|
||||
|
@ -36,8 +33,4 @@ public abstract class AbstractCollectionEvent extends AbstractEvent {
|
|||
public Object getAffectedOwner() {
|
||||
return affectedOwner;
|
||||
}
|
||||
|
||||
public Serializable getAffectedOwnerId() {
|
||||
return affectedOwnerId;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -763,10 +763,10 @@ public abstract class AbstractCollectionEventTest extends FunctionalTestCase {
|
|||
ownerExpected,
|
||||
( ( AbstractCollectionEvent ) listeners.getEvents().get( index ) ).getAffectedOwner()
|
||||
);
|
||||
assertSame(
|
||||
ownerExpected.getId(),
|
||||
( ( AbstractCollectionEvent ) listeners.getEvents().get( index ) ).getAffectedOwnerId()
|
||||
);
|
||||
//assertSame(
|
||||
// ownerExpected.getId(),
|
||||
// ( ( AbstractCollectionEvent ) listeners.getEvents().get( index ) ).getAffectedOwnerId()
|
||||
//);
|
||||
assertSame(
|
||||
collExpected, ( ( AbstractCollectionEvent ) listeners.getEvents().get( index ) ).getCollection()
|
||||
);
|
||||
|
|
|
@ -313,10 +313,10 @@ public class BrokenCollectionEventTest extends FunctionalTestCase {
|
|||
ownerExpected,
|
||||
( ( AbstractCollectionEvent ) listeners.getEvents().get( index ) ).getAffectedOwner()
|
||||
);
|
||||
assertSame(
|
||||
ownerExpected.getId(),
|
||||
( ( AbstractCollectionEvent ) listeners.getEvents().get( index ) ).getAffectedOwnerId()
|
||||
);
|
||||
//assertSame(
|
||||
// ownerExpected.getId(),
|
||||
// ( ( AbstractCollectionEvent ) listeners.getEvents().get( index ) ).getAffectedOwnerId()
|
||||
//);
|
||||
assertSame(
|
||||
collExpected, ( ( AbstractCollectionEvent ) listeners.getEvents().get( index ) ).getCollection()
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue