HHH-10017 - Bytecode enhancer - consistent handling of persistent attributes (field / property access)

This commit is contained in:
Steve Ebersole 2015-08-05 14:16:29 -05:00
parent cff4cb4b7a
commit 266ec761f4
1 changed files with 6 additions and 2 deletions

View File

@ -45,8 +45,12 @@ public class EnhancedSetterMethodImpl implements Setter {
// for enhanced attribute, don't flag as dirty
if ( target instanceof SelfDirtinessTracker ) {
( (SelfDirtinessTracker) target ).$$_hibernate_suspendDirtyTracking( true );
setterMethod.invoke( target, value );
( (SelfDirtinessTracker) target ).$$_hibernate_suspendDirtyTracking( false );
try {
setterMethod.invoke( target, value );
}
finally {
( (SelfDirtinessTracker) target ).$$_hibernate_suspendDirtyTracking( false );
}
}
else {
setterMethod.invoke( target, value );