[jboss-user] [EJB 3.0] - Re: Extended Persistence Context and merge()

waynebaylor do-not-reply at jboss.com
Wed May 16 21:46:38 EDT 2007

merge() will figure out whether or not the entity passed is new or detached. If it's new then merge() will persist it (eventually resulting in an INSERT), otherwise it will update the DB with the current state of the entity (eventually resulting in an UPDATE).

(warning: merging a removed entity will throw an exception)

check these out for more info:

section 3.6 and 3.7

EJB3 Persistence Specification section

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046337#4046337

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046337

More information about the jboss-user mailing list