我有一个Race类和RaceController类。创建/读取/更新&当我运行应用程序时,即使你在控制器类中有“def scaffold = true”,也没有生成删除视图。如何生成创建/读取/更新&删除文件
class Race {
static hasMany = [registrations:Registration]
String name
Date startDate
String city
String state
BigDecimal distance
BigDecimal cost
Integer maxRunners = 100000
static constraints = {
name()
startDate()
city()
state()
distance()
cost()
maxRunners()
}
}
class RaceController {
def scaffold = true
}
答案 0 :(得分:3)
应该是:
static scaffold = true
不
def scaffold = true
答案 1 :(得分:0)
grails generate-views some.package.DomainObject
将创建物理文件