【发布时间】:2016-04-03 05:38:45
【问题描述】:
如何在 Grails 中使用条件查询或 executeQuery 编写以下查询?
select * from table1 as t1 left Join(select * from table2 where id=2)as t2 On t2.table1=t1.id ;
【问题讨论】:
-
如果你展示你的领域模型会更容易提供帮助。
-
我很好奇,您为什么要使用条件查询或 HQL 来执行此操作,而不是使用已有的 SQL?
标签: spring hibernate grails grails-orm hibernate-criteria