[英]How to query 3 tables in Grails Gorm
我是 grails 框架的新手,如何查询它们之间有关联的 3 个表
Class A{
static hasMany = [b:B]
}
enter code here
class B{
long aId // Id of table A
}
class c{
B b //B reference
}
SQL 查询:select * from C where b_id in (select id from B where a_id='10'_)
Any help will be appreciated.
直截了当
def list = C.withCriteria{
b{
eq 'aId', '10'
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.