A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java 8 in Action
this week in the
EJB Certification (SCBCD/OCPJBCD)
Removed entity becomes managed?
no more user
Joined: Aug 07, 2002
Dec 09, 2006 07:46:00
Taking a look at JPA specification (3.2.1)
...persist operation, applied to an entity X are as follows:
If X is a removed entity, it becomes managed.
but when I try to run a simple hibernate example:
Message m = em.find(Message.class, 32768L);
: deleted entity passed to persist.
How can a removed entity becomes managed as a result of persist operation?? Am I missing something??
Please, any help?
[ December 10, 2006: Message edited by: Alexandre Lima ]
Joined: Dec 03, 2006
Dec 13, 2006 07:55:00
It looks like, the provider you are using (Hibernate) is having some issues. When I tried with a similar example in Toplink ships with reference implementation of
Server ( Glassfish), it works for me.
I agree. Here's the link:
subject: Removed entity becomes managed?
ejb 3.0 - persist(...) description contradiction in API spec
Question about entity operations in the JPA Specification
detached entity vs. removed entity
Hibernate persistence not throwing EntityExistsException on persist
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014