Grails 2.5.1 (hibernate 3) criteria multiple joins to same table
问题 I've found similar questions, but no answers. class SomeDomain { static hasMany= [productData:ProductData] } ProductData is simple type/value pair I'm trying to find all SomeDomains that have multiple products of certain type (in a loop). Currently the relevant portion of the criteria looks like: SomeDomain.createCriteria.list { somedata.each { type, value -> productData { eq("type", type) eq("value", value) } } } However, this generates only a single join with the SQL: from some_domain this_