Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

merge () vs persist ()  RSS feed

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When can I use merge () and when can I use persist ()? Both does the job of associating detached Objects to a session. Did I get this right?
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have a detached object, you need to merge first before you can call persist.

Mark
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!