Hi
From the presentation layer i am sending the partial java object where i am changing only one or two elements (i know the id or key). When i try to do session.merge() on the partial object, my understanding is if there is no persistent instance currently associated with the session, try to load it from the database and merge with the object i am passing.
The object which i am trying to update has both parent and child relations. After the merge i am loosing all the relations and only updating the fields which sets in the java object.
Question is there a way i can update the partial object and preserve all the relations or i have to pass the whole object (with relations) when i do merge. Any insight or suggestions is of great help. I am using hibernate 3.
Regards
Rishi
|