Querying ManyToMany relationship with Hibernate Criteria
问题 I'm not sure how to describe this problem, so I think an example is the best way to ask my question: I have two tables with a manyToMany relationship: DriversLicence <-> LicenceClass LicenceClass is things like "Car", "Motorbike", and "Medium Rigid". Using Hibernate Criteria, how can I find all licences that have both "Car" and "Motorbike" LicenceClasses? UPDATE 12/11/2008 I have discovered that this can easily be achieved by using a custom ResultTransformer. However the problem is that a