This content has been marked as final.
Show 3 replies
-
1. Re: What is the Difference Between Merge and Persist?
epbernard Aug 17, 2005 5:57 AM (in response to mduffy_lists)Merge != update
persist could avoid some extra Select to detect whether the object is in DB or not -
2. Re: What is the Difference Between Merge and Persist?
mduffy_lists Aug 17, 2005 4:11 PM (in response to mduffy_lists)If it is just a matter of saving some overhead, then it seems that it would be good practice to use merge instead of persist whenever a new entity could possibly contain a detached entity (because in this case if you use persist, an exception is thrown).
Any thoughts on this?
Mike -
3. Re: What is the Difference Between Merge and Persist?
epbernard Aug 18, 2005 9:28 PM (in response to mduffy_lists)some people does not consider it as a small overhead, but yes in not critical path, you can use it.