nhibernate: uninitialized surrogate upheld save() cascade


i keep removing an nhibernate.persistentobjectexception job session.save() due an uninitialized surrogate upheld save(). i fiddle cascade settings i away, nonetheless following child objects aren't being saved.



the wholly repair i have found adding following defaultsaveeventlistener.



    stable overrule bool reassociateifuninitializedproxy(object obj, global::nhibernate.engine.isessionimplementor source)
{
(!nhibernateutil.isinitialized(obj))
nhibernateutil.initialize(obj);

relapse base.reassociateifuninitializedproxy(obj, source);
}


this apparently an ideal solution.



any ideas?



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members