【发布时间】:2013-08-13 04:42:59
【问题描述】:
我正在使用 Groovy/Grails Tool Suite 创建一个 Grails 项目。如果我选择 Run As >> Groovy Console,我可以从我的域类创建示例对象,但无法保存它们。
所以,
new things.Thing(height: 20, length: 30)
创建一个新事物,但是
new things.Thing(height: 20, length: 30).save()
抛出异常
No signature of method: thing.Thing.save() is applicable for argument types: () values: []
即使 respondsTo 声明 Things 响应 save()。
有人知道为什么会这样吗?
【问题讨论】:
标签: grails