HHH-11293 - Consider enhanced entities with collections as being not unequivocally non-dirty

This commit is contained in:
Craig Andrews 2016-12-02 12:43:39 -05:00 committed by barreiro
parent 71d278b77d
commit 0908b2d9a6
No known key found for this signature in database
GPG Key ID: B56FFB7502C31F42
1 changed files with 2 additions and 2 deletions

View File

@ -354,7 +354,7 @@ public abstract class AbstractEntityEntry implements Serializable, EntityEntry {
@SuppressWarnings( {"SimplifiableIfStatement"})
private boolean isUnequivocallyNonDirty(Object entity) {
if ( entity instanceof SelfDirtinessTracker ) {
return ! ( (SelfDirtinessTracker) entity ).$$_hibernate_hasDirtyAttributes();
return ! persister.hasCollections() && ! ( (SelfDirtinessTracker) entity ).$$_hibernate_hasDirtyAttributes();
}
final CustomEntityDirtinessStrategy customEntityDirtinessStrategy =