【发布时间】:2012-06-20 18:34:31
【问题描述】:
根据 Grails 文献
http://grails.org/doc/2.0.x/ref/Domain%20Classes/getAll.html
我应该可以做到的
def biweeklyBatchRanges = BiweeklyBatchRange.getAll()
没有得到这个
groovy.lang.MissingMethodException: No signature of method: com.myplang.donation.BiweeklyBatchRange.getAll() is applicable for argument types: () values: []
Possible solutions: getAll(), getAt(java.lang.String), getId(), get(java.io.Serializable), getClass(), findAll()
有什么想法吗?蒂亚!
【问题讨论】:
-
getAll([1, 2, 3])是否按预期工作? -
您链接到 2.0 的文档。您使用的是 Grails 2.0 吗?或者可能是更早的版本?
-
我也遇到过同样的问题,看起来有点紧张。尝试使用 findAll。
-
我使用的是 2.0.3。 findAll 成功了。谢谢马尔科!
标签: grails grails-orm