Most probably you cleanup the database outside of your application, but the JPA provider doesn't know about this. So for the provider an entity with the same PK already exist, and because it can't distinguish between a detached and a new instance looking at its state, it assumes that it knows best and treats it as a detached instance.
Does it make sense?
thanks,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]
http://forums.java.net/jive/thread.jspa?messageID=249634