On Nov 22, 2007 3:12 PM, maho77 <[EMAIL PROTECTED]> wrote:

> 14:53:06,841 ERROR [LoginAdminImpl] Fehler beim Speichern der MTIGroup
> <openjpa-1.0.0-r420667:568756 nonfatal store error>
> org.apache.openjpa.persistence.EntityExistsException: Attempt to persist
> detached object "[EMAIL PROTECTED]".
> FailedObject: [EMAIL PROTECTED]
....
> @Entity
> @Table(name="group_table")
> public class MTIGroup implements Serializable, IMTIGroup {
>
>         private int id = -1;

It's a guess - shot in the dark, but worth to try out - why do you
assign -1 to the entity primary key? 0 is the default value so
everything that's different than the default value is likely
considered as a valid persistent identifier.

You may eventually want to run the sample with em.persist(em.merge(group)).

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Reply via email to