【发布时间】:2016-11-02 19:31:26
【问题描述】:
我被这个错误困住了:
org.hibernate.MappingException: Could not determine type for: com.mywebsite.entity.Image, at table: User, for columns: [org.hibernate.mapping.Column(profilePhoto)]
我知道它被问了很多,但我坚持这个。它已经尝试了几个小时,但我找不到任何有用的东西......
这是我的两门课:
@Entity
public class Image extends com.mywebsite.entity.Entity{
//System
@Id
@GeneratedValue
private int id;
[...]
}
@Entity
public class User extends com.mywebsite.entity.Entity{
//System
@Id
@GeneratedValue
private int id;
[...]
//Data
private Image profilePhoto;
[...]
}
有人可以帮我吗?
【问题讨论】:
-
这行之前没有注释吗?
private Image profilePhoto; -
不,我没有“私人字符串密码;”之前
-
可以提供hbm文件吗?