Author: gbadner
Date: 2008-01-30 22:02:51 -0500 (Wed, 30 Jan 2008)
New Revision: 14303
Modified:
core/branches/Branch_3_2/src/org/hibernate/event/AbstractCollectionEvent.java
core/branches/Branch_3_2/test/org/hibernate/test/event/collection/AbstractCollectionEventTest.java
core/branches/Branch_3_2/test/org/hibernate/test/event/collection/BrokenCollectionEventTest.java
Log:
HHH-2616 : backed out of changes that provide the affected owner ID from collection events
due to unit test failures
Modified: core/branches/Branch_3_2/src/org/hibernate/event/AbstractCollectionEvent.java
===================================================================
---
core/branches/Branch_3_2/src/org/hibernate/event/AbstractCollectionEvent.java 2008-01-31
01:13:44 UTC (rev 14302)
+++
core/branches/Branch_3_2/src/org/hibernate/event/AbstractCollectionEvent.java 2008-01-31
03:02:51 UTC (rev 14303)
@@ -15,14 +15,11 @@
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 Object getAffectedOwner() {
return affectedOwner;
}
-
- public Serializable getAffectedOwnerId() {
- return affectedOwnerId;
- }
}
Modified:
core/branches/Branch_3_2/test/org/hibernate/test/event/collection/AbstractCollectionEventTest.java
===================================================================
---
core/branches/Branch_3_2/test/org/hibernate/test/event/collection/AbstractCollectionEventTest.java 2008-01-31
01:13:44 UTC (rev 14302)
+++
core/branches/Branch_3_2/test/org/hibernate/test/event/collection/AbstractCollectionEventTest.java 2008-01-31
03:02:51 UTC (rev 14303)
@@ -763,11 +763,11 @@
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()
);
}
Modified:
core/branches/Branch_3_2/test/org/hibernate/test/event/collection/BrokenCollectionEventTest.java
===================================================================
---
core/branches/Branch_3_2/test/org/hibernate/test/event/collection/BrokenCollectionEventTest.java 2008-01-31
01:13:44 UTC (rev 14302)
+++
core/branches/Branch_3_2/test/org/hibernate/test/event/collection/BrokenCollectionEventTest.java 2008-01-31
03:02:51 UTC (rev 14303)
@@ -313,11 +313,11 @@
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()
);
}
Show replies by date