我是Grails的新手,當我在所有域內容上運行項目時,在我的三個域中的兩個域中獲取此錯誤。作品域名Grails中的類[]的屬性[]不能爲空錯誤
class Location {
def scaffold = true
String company
String name
String address
static belongsTo=[company:Company]
static constraints = {
}
}
不工作是
class Report {
def scaffold = true
String title
String location
Date published
static belongsTo=[location:Location]
static constraints = {
}
}
我看不出是trowing錯誤的結構或語法問題域。我一直在嘗試各種增加和減少,並且似乎無法找到任何解決此錯誤的基本級別的東西。再次,我剛開始使用Grails和Groovy
何時發生錯誤?它究竟是什麼意思? – Eylen
當我點擊創建時我得到-----創建報告 類[class lcm.Report]的屬性[location]不能爲null class [class lcm.Report]的屬性[published]不能爲null Property [title ]的類[lcm.Report]不能爲空 –