Hi, I found an 
article<http://nhforge.org/wikis/howtonh/finding-dirty-properties-in-nhibernate.aspx>saying
 that the following will retrieve the old/original state of an entity:
 
var sessionImpl = session.GetSessionImplementation();
var persistenceContext = sessionImpl.PersistenceContext;
var oldEntry = persistenceContext.GetEntry(entity);
var persister = sessionImpl.Factory.GetEntityPersister(oldEntry.EntityName);
 
// Unproxy
if (oldEntry == null && entity is INHibernateProxy)
    oldEntry = 
sessionImpl.PersistenceContext.GetEntry(sessionImpl.PersistenceContext.Unproxy((INHibernateProxy)entity));
 
var oldState = oldEntry.LoadedState;
 
I hoped this would return the entity in it's original state when it was 
loaded from the database. However If I look at the old state it has the 
values which have been updated. Has this changed in a later version and if 
so is this still possible? Thanks

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to