I may be wrong but is this not to do with transactions?
try
| entityManager.flush()
after you've done the merge but before you query the db
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965990#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...