[jboss-user] [EJB 3.0] - Need advice on refreshing @Version column
treespace
do-not-reply at jboss.com
Fri Aug 18 18:17:24 EDT 2006
I need to merge changes an entity instance multiple times. The second merge causes an optimistic lock failure unless I "manually" update the version string:
original.setVersion( em.merge( original ).getVersion() );
I cannot use the updated entity returned from merge because I have many reference to the original instance in several lists.
Calling em.refresh( original ) after em.merge( original ) did NOT update the @Version column. Why doesn't refresh update the version column?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966189#3966189
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966189
More information about the jboss-user
mailing list