I am new to HQL and have the following table relationships:
Term
has manyDefinitions
Definition
has manyDefinitionProducts
DefinitionProducts
has oneProduct
I want to get the list of Terms
that have at least one Definition
that has at least one DefinitionProduct
that has a specific Product
This is my best attempt (in Grails):
Term.findAll("from Term t, Definition d inner join t.definitions def,
def.definitionProducts dp where ? = some elements (dp.product)",
Product.get(1))
With the above, I get a "def.definitionProducts is not mapped" exception.