我是 Grails 的新手,想为 HasMany-Relationship 建模,如下所示:
class Comment {
String content
static constraints = {}
}
class Text {
String content
static hasMany = [comments: Comment]
static constraints = {}
}
问题是,这个脚手架不起作用,它在调用创建视图时会产生错误。我正在使用 Grails 2.0.4。使用搜索后,我来到了这个堆栈溢出线程。
他们讨论了同样的错误,但他们说,他们手动更改了视图。作为一个新人,我的问题是:我怎样才能改变视图,以便我可以对一个文本做很多评论?
格雷茨