简体   繁体   中英

Nhibernate not tracking changes

I'm using nhibernate and it appears that changes to my new object are not persisted. After creating and saving an object I then modify it and commit the transaction. However none of the modifications are saved. The strange thing is this code was working previously and I have no idea what could cause this. Nothing was changed that's obviously related..

As an attempted work around I saved the object later in the procedure after all the changes where made however I was greeted with an Assertion Failure collection [] was not processed by flush.

Any ideas?

I have no idea what happened but the issue has been resolved, as far as I can tell the initial result shouldn't have happened. However the assertion failure was a very real problem, I was loading a user in the pre insert event listener for auditing reasons and users contain collections which were obviously not processed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM