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 hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?