mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-18 00:55:16 +00:00
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,19 +333,7 @@ protected boolean handleInterception(FlushEntityEvent event) {
|
||||
|
||||
//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 );
|
||||
}
|
||||
dirtyCheck( event );
|
||||
}
|
||||
|
||||
return intercepted;
|
||||
|
@ -18,7 +18,6 @@
|
||||
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 void testOnlyCustomStrategy() {
|
||||
}
|
||||
|
||||
@Test
|
||||
@FailureExpected(jiraKey = "HHH-12718")
|
||||
public void testCustomStrategyWithFlushInterceptor() {
|
||||
Session session = openSession();
|
||||
session.beginTransaction();
|
||||
|
Loading…
x
Reference in New Issue
Block a user