【发布时间】:2014-07-21 20:13:16
【问题描述】:
我正在使用 GORM finder,但出现运行时错误,我认为这是因为我的语法不正确。这是我遇到问题的代码行:
def accountsOwnedByUser = AccountRecord.findAllWhere(owners.contains(indivRecord.uniqueId))
其中 owner 是 AccountRecord 类的 List 属性。我想找到给定帐户的所有所有者,我通过搜索其唯一 ID 出现在帐户所有权列表中的个人来做到这一点。但目前我收到此错误:
No such property: owners for class: com.twc.fatcaone.FileImportService. Stacktrace follows:
Message: No such property: owners for class: com.twc.fatcaone.FileImportService
Line | Method
->> 968 | doCall in com.twc.fatcaone.FileImportService$_$tt__deleteIndividualRecord_closure18
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 967 | $tt__deleteIndividualRecord in com.twc.fatcaone.FileImportService$$EOkgHOSW
| 168 | doCall . . . . . . . . . . . . in com.twc.fatcaone.FileImportService$_$tt__excelIndividualFileUpload_closure16$$EOkgHOSW
| 162 | $tt__excelIndividualFileUpload in com.twc.fatcaone.FileImportService$$EOkgHOSW
| 147 | upload . . . . . . . . . . . . in com.twc.fatcaone.CustomerController
| 198 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter . . . . . . . . . . . in grails.plugin.cache.web.filter.AbstractFilter
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 744 | run in java.lang.Thread
我需要像it.owners 或类似的东西,可以用作GORM 动态查找器的参数。有没有等价物?
【问题讨论】:
标签: grails grails-orm