Hello all,
some entity was changed otherwise during it was editing in web. This entity is associated
with an extended persistent context. After trying to persist the changes, it naturally (as
expected) throws an exception. My idea is
| Entity merged = em.merge(dirtyEntity) ;
| if(merged.isModifiable())
| em.persist(merged);
|
quite simple, but the merge returns an entity with old version number (doesn't hit the
DB). So this simple case doesn't work.
What is the best way to recover from the optimistic lock exception/issue?
Thank you for advise, Gena
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061597#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...