1
如何用Hibernate映射我自己的类作为其他类中属性的类型?例如,我有类地址和类用户。我尝试映射如下:休眠。如何将自己的类映射为实体中的属性类型?
public class User {
private Long id;
private Address address;
// other fields
}
但我得到的异常在这种情况下:
org.hibernate.MappingException: Could not determine type for: es.myproject.entity.User
我将是任何指导或相应的样本上有用的链接感谢。最好使用Hibernate注释。提前致谢!