I have:
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
class A {
int id;
int x;
}
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
class B extends A {
}
@Entity
class C {
@OneToMany (cascade = {CascadeType.ALL}, fetch = FetchType.LAZY,
mappedBy = "c")
@OrderBy("x")
public Collection getBs() {
return bs;
}
}
THE orderBy it crashes : message the table B does not contain x column.
any solutions to orderBy using an inherited field ?