1 Reply Latest reply on May 4, 2005 12:29 PM by Emmanuel Bernard

    Query by class type in one-to-many with hierachy

    Philipp Meier Newbie

      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.?