I have to use Hibernate (stateless) Session instead of JPA's EntityManager because I need to be able to iterate over result sets, and therefore I have to use Hibernate Criteria instead JPA 2 Criteria for building dynamic queries. But I could not found a factory method like
Code:
Criterion Restrictions.isMember(String elementPropertyName, String collectionPropertyName)
to create a criterion that tests whether an element is a member of a collection. Have I implement such Criterion myself, or is there a way to emulate it by provided Hibernate Criteria expressions?