我正在尝试按照本教程:http://howtodoinjava.com/2014/09/25/hibernate-jpa-cascade-types/
并且有一方有@OneToMany映射而另一方有@OneToOne。那可能吗 ?我收到错误
Caused by: org.hibernate.AnnotationException: Referenced property not a (One|Many)ToOne: com.springapp.mvc.entities.EmployeeEntity.accounts in mappedBy of com.springapp.mvc.entities.AccountEntity.employee
答案 0 :(得分:0)
不可能有这个。如果一方是一对多,另一方必须是多对一。