Hi all... Am facing a critical problem with audit logging using hibernate.. Heres the hierachy of class (Invoice System) that i have. 1. Invoice (Object) 1.1 Line Item (List) 1.1.1 Account Distribution (List) 1.1.2 Additional Charge (List) 188.8.131.52 Account Distribution (List) 1.2 Invoice Level Additional Charge (List) 1.2.1 Account Distribution (List)
The problem that occurs is that incase i am updating/deleting a Invoice loaded from DB everything works proper audit trials are been created. But let say the User adds a new Account Distribution object to any of the Account Distribution List.. hibernate raises a "not-null property references a null or transient value" exception debugging it i saw that when Session.merge is been called on Invoice object for all new Account Distribution object in the list the backref id properties are getting set to null. even though just before session.merge they were very much there..
Please advice if theres any thing in particular that i need to handle