日期:2014-05-17 浏览次数:20803 次
org.hibernate.ObjectNotFoundException: No row with the given identifier exists
@ManyToOne
@JoinColumn(name="pid")
private CenterInfo parentCenterInfo;
@OneToMany(cascade=CascadeType.ALL, mappedBy="parentCenterInfo" ,fetch=FetchType.LAZY)
@Sort(type=SortType.COMPARATOR,comparator=CenterInfoComparator.class)
private Set<CenterInfo> centerInfos=new TreeSet<CenterInfo>();
@ManyToOne(targetEntity=Department.class)
@JoinColumn(name="parentId")
private Department parent;
@OneToMany(mappedBy="parent",cascade=CascadeType.ALL)
@OrderBy(value="id ASC")
private Set<Department> children = new HashSet<Department>();