我有一个域类这样Grails-如何查询列表
Class Rules{
List <Department> departments = new ArrayList<Department>()
// blah blah
static hasMany = [departments:Department]
}
Class Department {
String name
}
def listOfRules= // find the rules based on department selected
我试图让所有包含选定的部门..所以我如何可以查询..
规则这是使用hibernate的grails应用程序。
您不应该声明列表。在静态hasMany中已经足够了。 –
erturne
2012-01-09 13:12:41