You mixed the lines.
You must write:
| (...)
| a.setName("F002");
| em.merge(a);
| (...)
|
If you call persist or merge on an entity manager, the entity manager recognizes the state
of the entities at this time. Changes which are made later to the entities doesn't
bother him if they aren't followed by a merge operation. If the entity manager leaves
the scope of a transaction, he persists the entitie states to the database.
Thats the reason why your entity isn't updated.
Best regards
Meinert
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986667#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...