When I'm trying to commit Transaction I'm getting:
javax.persistence.RollbackException: Transaction failed to commit
javax.persistence.PersistenceException: Object with id "" is managed by a different
org.datanucleus.exceptions.NucleusUserException: Object with id "" is managed by a different Object ManagerObject Manager
My Code is:
@Entity
public class Profile implements Serializable
{
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long profileId;
private String m_Name;
private String m_Email;
private String m_Password;
@ManyToOne()
private List<MyPoint> m_points = null;
.
.
}
@Entity
public class MyPoint implements Serializable
{
private static final long serialVersionUID = 1L;
@Id
private int pointId;
private int m_LatitudeE6;
private int m_LongitudeE6;
.
.
}
- If I'm deleting m_points with his annotations everything works fine.
- I'm using JPA 1.0 with Google App Engine
What am I doing wrong?
Thanks.