mmerder wrote:
Well, then you need to provide more information so others can help you. Like the code inside the update-transaction and maybe the sql-statements that get submitted also.
I managed to resolve it.
I am using Spring MVC along with hibernate. The hibernate enity is being used as a Spring MVC form backing object.
A Spring SimpleFormController has two callback methods formBackingObject() and onSubmit(). (formBackingObject is called every time before onSubmit() if your form has sessionForm=false)
Earlier I was deleting/saving the C values in database in formBackingObject() callback and then saving A values in onSubmit(). Somehow the C values changed in formBackingObject() was not reflecting in the form backing object (I am using A object).
I managed to fix it by moving the C values deleting/saving code to onSubmit(). But still I am not sure why session.save(A) was calling update on C.