Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

about 3.3.2 Persisting an entity instance  RSS feed

 
Ranch Hand
Posts: 1686
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



The semantics of the persist operation, applied to an entity X are as follows:
...
If x is a removed entity, it becomes managed.



I think if x is removed, it is not managed by persistence context anymore. It should be detached.
It is completely removed only when the transaction commits or synchronized with the DB.
 
Creator of Enthuware JWS+ V6
Bartender
Posts: 3108
256
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, the definition of "removed" was given earlier:


3.2 Entity Instance’s Life Cycle
A removed entity instance is an instance with a persistent identity, associated with a persistence context, that will be removed from the database upon transaction commit.

 
To do a great right, do a little wrong - shakepeare. twisted little ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!