Hi,
I have the following Grails domain objects
class ProductType {
String name
static hasMany = [attributes: Attribute]
}
class Attribute {
Boolean mandatory = false
Integer seq
static belongsTo = [productType: ProductType]
}
I would like to get all ProductType
s and their mandatory Attribute
s. Furthermore, I'd like the selected Attribute
s to be eagerly loaded and sorted by the seq
property. I've tried all kinds of HQL and Criteria queries, but can't seem to figure it out.