[jboss-user] [EJB 3.0] - Re: UserTransactions and merge
hoeft
do-not-reply at jboss.com
Thu Nov 16 15:30:30 EST 2006
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#3986667
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986667
More information about the jboss-user
mailing list