这一直困扰着我。以下查询有效:
Receipt.where{project.customer == customer}.list()
但此查询会抛出异常
Receipt.where{project.customer.id==customer.id}.list()
异常:
类 groovy.lang.MissingMethodException消息 没有方法签名:receiptbucketserver.Customer.call()适用于参数类型: (receiptbucketserver.ReceiptHelperService $ _tt__getReceiptsByCustomer_closure11_closure12_closure13) 值: [receiptbucketserver.ReceiptHelperService$_tt__getReceiptsByCustomer_closure11_closure12_closure13@170130c3] 可能的解决方案:wait(),last(),save(),any(),getAll(), 等待(长)