我有两个域类:
class A { String Name ... } class B { A request B response ... }
我怎样才能得到一个唯一的列表,作为“请求”出现在B中?我试过
def g = A.findAll("from A as e, B as r where e=r.request")
但提取结果对象时遇到问题。
谢谢
B.executeQuery( "select distinct b.request from B b" );