Hibernate: Used mappedBy on class that extends another class annotated as JoinedSubclass?

后端 未结 3 1571
迷失自我
迷失自我 2021-02-19 09:46

The following doesn\'t work:

@Entity
class Owner {

  @OneToMany(mappedBy=\"owner\", cascade = {CascadeType.ALL})
  protected Set getBSet() {
    ..
  }         


        
3条回答
  •  佛祖请我去吃肉
    2021-02-19 10:12

    I'd double check your real implementation. I used your sample code and after adding an @Id everything worked as expected. Even IntelliJ says getBSet() is associated with B.owner.

提交回复
热议问题