adeon wrote:
I have a ternary association, which is represented by the following map:
Code:
<class name="Actor" table="Actor">
...
<map name="fieldValues" table="ActorFieldValues">
<key column="ownerID" />
<map-key-many-to-many column="fieldID" class="Field" />
<many-to-many column="valueID" class="FieldValue" />
</map>
</class>
I want to find all objects (actors) whose fieldValues keys match some restrictions.
Is it possible to do using a HQL query (especially using Criteria)?
AD
I do believe in HQL you can use a join and specify an extra filter for the join by using WITH keyword. This is an example from hibernate document:
Code:
from Cat as cat
left join cat.kittens as kitten
with kitten.bodyWeight > 10.0
Is this what you are looking for?
Farzad-