[jboss-user] [JBoss Seam] - Re: reasociating detached entities (non smpc)
jacob.orshalick
do-not-reply at jboss.com
Fri Sep 14 14:22:43 EDT 2007
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
More information about the jboss-user
mailing list