我正在將2.3應用程序升級到2.4.4,並且我有幾個域使用類似於以下內容的列表字段,並且我收到如here所述的錯誤。Grails中的域列表字段2.4.4
class Game {
List score
static hasMany = [ score: Integer ]
}
我假設使用的是上述問題的真正原因,而是因爲錯誤消息不指向域我不能肯定。
這種類型的列表定義不是很好的grails實踐嗎?
我得到的錯誤:
2014-10-31 16:26:32 ERROR [context.GrailsContextLoaderListener] Error initializing the pplication: Error creating bean with name 'transactionManagerPostProcessor':
....
Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.MappingException: Association references unmapped class: java.util.List
UPDATE
我找到的域,並與錯誤相關的問題。這是問題域和關聯的列表。如果我刪除列表,則問題得到糾正。
class Team {
List teamTourney
static hasMany = [ teamTourney: TeamTourney ]
}
「我假設使用上述是問題的實際原因,但我無法確定,因爲錯誤消息不指向域。」 - 如果錯誤信息沒有指向那個,爲什麼你認爲問題與域有關? – 2014-12-01 22:17:13