All, I'm trying to track the the object causing this error:
"NHibernate.TransientObjectException : object references an unsaved transient instance - save the transient instance before flushing. Type: Entities.Allocation.OrderItemAllocation, Entity: Entities.Allocation.OrderItemAllocation". I'm trying to use NH logging to work out which object has the reference to the one listed in the exception that causes the error, but the amount of log data NH throws out means I can't see what is going on, nor what I'm actually looking for. Some extra background: I have a mapping along the lines of Order -> Order Item -> Entry Order -> Order Allocation -> Order Item Allocation -> Entry (the same entry instance as above) I'm using Hilo key generation. When I create my order and classes then save the order, everything cascades down correctly. However I also have mapping such as: Account -> Entry In my code I need to add the entry to the Order Item and Order Item Allocation entry collections, BUT ALSO to the Account Entry collection. I have made sure that the entry pointers to all it's parent objects are correct and all set to Inverse="true". However when I add the entry to the account object I get the error. I can't work out why. I thought I'd got round it by evicting the account from the session before flush, but although in test this works, in live it does not. I'm therefore trying to either (a) work out why the account -> entry causes the error or (b) use NHIbernate logging to work out the object causing the error. Any help at all please. It's been driving me crazy for 2 days. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
