private void DoUpdateMutable( object obj, object id, IClassPersister persister ) { if( log.IsDebugEnabled ) { log.Debug( "updating " + MessageHelper.InfoString( persister, id ) ); } Key key = new Key( id, persister ); CheckUniqueness( key, obj ); if( persister.ImplementsLifecycle ) { log.Debug( "calling onUpdate()" ); if( ( ( ILifecycle ) obj ).OnUpdate( this ) == LifecycleVeto.Veto ) { log.Debug( "update vetoed by onUpdate()" ); Reassociate( obj, id, persister ); return; } } // this is a transient object with existing persistent state not loaded by the session new OnUpdateVisitor( this, id ).Process( obj, persister ); AddEntity( key, obj ); AddEntry( obj, Status.Loaded, null, id, persister.GetVersion( obj ), LockMode.None, true, persister, false ); }