Fixed
Details
Details
Assignee
Unassigned
UnassignedReporter
Dan Jasek
Dan JasekComponents
Fix versions
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created March 19, 2011 at 5:41 PM
Updated July 30, 2011 at 2:10 PM
Resolved March 21, 2011 at 7:10 AM
An entity with a lazy property cannot be loaded from one session and saved from another.
This is because the entity is a proxy object, but it is not an INHibernateProxy. Therefore, when it is attached to the new session NHibernate reads it's type as the Proxy type and it can't find the appropriate persister.
The attached patch fixes this by using NHibernateProxyHelpter.GuessClass instead of just running GetType on the entity.
I have only tested this with the Castle ByteCode, it may not be an issue for the others.