Hibernate one-to-many search with Criteria
I've got a Hibernate entity, called Event, which has a one-to-many metadata entity, EventData. Given the following Event: EventId: 1 EventHash: broccoli With the following EventDatas: EventDataId: 1 EventId:1 Field: tag Content: tagme EventDataId: 2 EventId: 1 Field: tag Content: anotherTag How do I create a Criteria query to retrieve the event which has BOTH tags "anotherTag" and "tagme"? In SQL, I'd join the event_data table once for each tag being searched for, but I can only seem to create one alias for the Event.EventData relationship, i.e. int inc = 0; Conjunction junc = Restrictions