HHH-12718 Compute dirtiness using whatever method is appropriate after a flush event interception
We used to have a simpler version of the dirtyCheck() method after an interception, but that's not enough.
This commit is contained in:
parent
47107e3e88
commit
e53e0ef790
|
@ -333,20 +333,8 @@ public class DefaultFlushEntityEventListener implements FlushEntityEventListener
|
|||
|
||||
//now we might need to recalculate the dirtyProperties array
|
||||
if ( intercepted && event.isDirtyCheckPossible() ) {
|
||||
if ( !event.isDirtyCheckHandledByInterceptor() ) {
|
||||
int[] dirtyProperties;
|
||||
if ( event.hasDatabaseSnapshot() ) {
|
||||
dirtyProperties = persister.findModified( event.getDatabaseSnapshot(), values, entity, session );
|
||||
}
|
||||
else {
|
||||
dirtyProperties = persister.findDirty( values, entry.getLoadedState(), entity, session );
|
||||
}
|
||||
event.setDirtyProperties( dirtyProperties );
|
||||
}
|
||||
else {
|
||||
dirtyCheck( event );
|
||||
}
|
||||
}
|
||||
|
||||
return intercepted;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ import org.hibernate.cfg.Configuration;
|
|||
import org.hibernate.persister.entity.EntityPersister;
|
||||
import org.hibernate.type.Type;
|
||||
|
||||
import org.hibernate.testing.FailureExpected;
|
||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -76,7 +75,6 @@ public class CustomDirtinessStrategyTest extends BaseCoreFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpected(jiraKey = "HHH-12718")
|
||||
public void testCustomStrategyWithFlushInterceptor() {
|
||||
Session session = openSession();
|
||||
session.beginTransaction();
|
||||
|
|
Loading…
Reference in New Issue