我有一个实体,我有一个列表:
@OneToMany(mappedBy = "wycenioneAuta", cascade = {CascadeType.DETACH, CascadeType.MERGE,
CascadeType.PERSIST, CascadeType.REFRESH}, fetch = FetchType.EAGER)
@OrderColumn(name = "photoId", nullable = false)
public List<ImageInfo> getPhoto() {
return photo;
}
但是当我添加照片时,数据库条目在“photoId”中有空值,这会导致错误"org.hibernate.HibernateException: null index column for collection: "
。
谢谢你的帮助