Hi,
I have a situation in which I need to update a table. But, along with the same update operation, I may also have to insert new records into a join table (Based on a set from the mapping file). It works fine, however I see a strange issue. Hibernate updates the main table without any problem, but when it comes to insert new records into the join table, it deletes all the existing records of the key and inserts them one by one. I would naturally expect Hibernate to just update with any new data from the collection and leaving whatever was there originally. I looked at the manuals for a solution, but could not find any. Can someone please help me on this?
Thank you,
Soby Chacko
|