Is it possible to have a one-to-many relation with the many side consiting if different subtypes of a class hierachy? Consider A 1->n B with B beeng subclassed by B1, B2, B3.
I want to query like from a join a.manyBs where b.class = subtype or b.type = 'discriminatorValue' but this does not work out. Is this missing in the spec and is there an alternative beside having an additional "type" fild in the subclasses of b which is set to a distinct value in the constructor e.g.?
the only way I can see is doable if you have a bidir relationship
select b.a from B1 b