This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Call EntityManager remove operation for removed entity. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Call EntityManager remove operation for removed entity." Watch "Call EntityManager remove operation for removed entity." New topic
Author

Call EntityManager remove operation for removed entity.

Czeslaw Szczotka
Greenhorn

Joined: May 16, 2010
Posts: 8
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

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.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Call EntityManager remove operation for removed entity.
 
Similar Threads
How do I add a row efficiently in a unidirectional one-to-many relationship?
Persistence
Entity Manager Remove Operation
Doubts in Enthuware mock Questions
detached entity vs. removed entity