If it is okay to copy the state of the given object onto the persistent object 
with the same identifier, the following will do the trick:


  |   ...
  |   attachedEntity = myHibernateSession.merge(detachedEntity);
  |   ...
  | 

Be aware of the semantics of the merge operation defined by JSR-220.

Otherwise, you could simply do a fetch join when you retrieve the object 
initially to also retrieve required dependencies.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084604#4084604

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084604
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to