Grails where子句,为什么我不能搜索id == id?

时间:2015-06-06 17:01:39

标签: grails gorm where

这一直困扰着我。以下查询有效:

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(),   等待(长)

0 个答案:

没有答案