• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt on merge method

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

The EJB 3.0 book from O'Reilly says on page 79 the following,

When the entity manager isn't already managing an entity instance with a particular id, a full copy of the entity parameter is made and returned from the merge() method.

If the entity manager is already managing an entity instance with the same primary key, then the contents of the entity parameter are copied into this managed entity instance.

The above two statements refer to the following example. My question is how do they differ?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic