我有3个实体。
@Entity(name = "a")
@Inheritance(strategy = InheritanceType.JOINED)
class A{
//things
}
@Entity(name = "b")
@DiscriminatorValue(value = "bbb")
class B extends A{
//things
}
@Entity(name = "c")
class C{
@ManyToOne
@JoinColumn(name = "A")
private A a;
}
这是一个dao中的某个方法。我必须通过它的基类
以某种方式访问B类some_method(Root<C> c){
c.join('a') // this is where i am stuck.
}
有什么想法吗?