org.hibernate.NonUniqueObjectException: a different object with the same ide
2012-07-23 03:08
453 查看
org.hibernate.NonUniqueObjectException: a different object with the same ide 出现这种情况一般是一对多或者多对多级联方面,我的情况是两边同时级联 把关联表的留下,外界表的去除即可 @OneToMany(mappedBy="admin")//,cascade=CascadeType.ALL)//,fetch=FetchType.EAGER) public Set<AdminRole> getAdminroles() { return adminroles; } @ManyToOne(cascade=CascadeType.ALL)//,fetch=FetchType.EAGER) @JoinColumn(name="adminId") public Admin getAdmin() { return admin; }
相关文章推荐
- org.hibernate.NonUniqueObjectException: a different object with the same ide
- org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the sessio
- org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the sessio
- 报错信息:Caused by: org.hibernate.NonUniqueObjectException: a different object with the same identifier
- org.hibernate.NonUniqueObjectException: A different object with the same identifier value was alread
- org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the sessio
- org.hibernate.NonUniqueObjectException: A different object with the same identifier value was alread
- org.hibernate.NonUniqueObjectException: a different object with the same identifier value was ...
- org.hibernate.NonUniqueObjectException: a different object with the same identifier value was alread
- hibernate错误:org.hibernate.NonUniqueObjectException: a different object with the same identifier valu
- org.hibernate.NonUniqueObjectException: a different object with the same identifier value was alread
- org.hibernate.NonUniqueObjectException: A different object with the same identifier value was alread
- org.hibernate.NonUniqueObjectException: a different object with the same identifier value was alread
- org.hibernate.NonUniqueObjectException: A different object with the same identifier解决方法
- org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the sessio
- org.hibernate.NonUniqueObjectException: a different object with the same identifier value was alread---------程序报错
- org.hibernate.NonUniqueObjectException: A different object with the same identifier value was alread
- org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the sessio
- org.hibernate.NonUniqueObjectException:a different object with the same identifier value was alread
- .NonUniqueObjectException: a different object with the same identifier等的解决