This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Call EntityManager remove operation for removed entity.  RSS feed

 
Czeslaw Szczotka
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
On Mikalai Zaikin's page http://java.boot.by/scbcd5-guide/ch06.html is described EntityManager remove operation.
For entity in removed state is sentence : "If A is a REMOVED entity, it is IGNORED" .
Is it correct ? Seems that for such situation we get IllegalStateException.

Thanks,
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the specification (and that's where the guide you're using took the information from), invoking remove on a removed entity will be ignored.

3.2.2 Removal
If X is a removed entity, it is ignored by the remove operation.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!