I debugged the code and found out that when an entity has collection in mapping (<set> in my case) the substitute variable is set to True in DefaultFlushEntityEventListener line 157:
boolean substitute = wrapCollections( session, persister, types, values );
Therefore the version in the entity was incremented in line 166:
if ( substitute )
Unknown macro: { persister.setPropertyValues( entity, values ); }
|