Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is a removed entity instance is not associated with a persistence context?

 
Fu Dong Jia
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If an entity was removed,it is detached.So, can we say:A detached entiy instance id is an instance with a persistence identity that is NOT associated with a persistence context?
 
Peter Purmonen
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this is exactly what you're looking for:
http://java.boot.by/scbcd5-guide/ch06s02.html
 
Fu Dong Jia
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone explain it concrete.
I can not visit that web site
 
Arun Kumar Gupta
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As given in MZ notes page 115,remove entity instance has a persistent identity ,is associated with a persistence context and is marked for removal from the database.

while a detached entity has persistence id that no longer associated with persistence context
Try go through that page
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!