【问题标题】:Grails: getAll throwing no signature of method exception?Grails:getAll抛出没有方法异常的签名?
【发布时间】: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


【解决方案1】:

除了使用 findAll 之外,从未得到过“答案”。 (Grails 2.0.3)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-10
    • 1970-01-01
    • 1970-01-01
    • 2013-03-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多