users@glassfish.java.net

JPA - why persist and merge, why not a sigle save

From: <glassfish_at_javadesktop.org>
Date: Sun, 22 Jul 2007 13:19:10 PDT

I don't understand why we do need two different methods for persisting and merging! Shouldn't persistence context be smart enough to distinguish between New, Manged and Detached entities? In that case all we need would be a Save method to persist/update a New/Managed/Detached entity.

Does anybody know what the rational is behind having two separate methods vs. one?
[Message sent by forum member 'mohammadwrk' (mohammadwrk)]

http://forums.java.net/jive/thread.jspa?messageID=227617