当我尝试提交事务时,我得到:
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
我的代码是:
@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;
.
.
}
- 如果我用他的注释删除 m_points 一切正常。
- 我将 JPA 1.0 与 Google App Engine 一起使用
我做错了什么?
谢谢。