I have something like the following
@MappedSuperclass public abstract class Foo {
@Column private String myId;
}
@Entity public class Bar extends Foo {
}
@Entity public class Baz extends Foo {
}
But I now want to query for all instances of Bar
and Baz
using myId
but my query gets rejected:
org.hibernate.hql.ast.QuerySyntaxException: Foo is not mapped [from Foo foo where foo.myId = :myId]