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:
Gail Badner 2008-01-31 03:02:51 +00:00
parent bc6708fcf6
commit 48154c5d84
3 changed files with 8 additions and 15 deletions

View File

@ -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;
}
}

View File

@ -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()
);

View File

@ -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()
);