HHH-3730 Compare both ids in isModified instead of an object and an id

This commit is contained in:
Guillaume Smet 2014-04-09 23:47:41 +02:00 committed by Brett Meyer
parent ee8f26a4be
commit c7903392cd
1 changed files with 3 additions and 2 deletions

View File

@ -227,8 +227,9 @@ public class ManyToOneType extends EntityType {
return true; return true;
} }
// the ids are fully resolved, so compare them with isDirty(), not isModified() // the ids are fully resolved, so compare them with isDirty(), not isModified()
return getIdentifierOrUniqueKeyType( session.getFactory() ) Object oldid = getIdentifier( old, session );
.isDirty( old, getIdentifier( current, session ), session ); Object newid = getIdentifier( current, session );
return getIdentifierOrUniqueKeyType( session.getFactory() ).isDirty( oldid, newid, session );
} }
public Serializable disassemble( public Serializable disassemble(