Fixed
Details
Details
Assignee
Unassigned
UnassignedReporter
João Alexandre de Toledo
João Alexandre de ToledoComponents
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created August 2, 2014 at 12:41 PM
Updated August 5, 2014 at 3:44 PM
Resolved August 5, 2014 at 3:39 PM
I have a class named Body; it has a property named Items, which is a set of BodyItem.
When I try to persist an instance of Body which has only one BodyItem in Body.Items, everything works, and audit data is also recorded. But when I add two different items to Body.Items and try to persist it, an exception is throwed:
NHibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: System.Collections.Generic.Dictionary`2[System.String,System.Object], of entity: ttbl_items_log
If I mark Body.Items with [NotAudited], then I can persist data normally, but (obviously) the audit data for the items is not recorded.