我正在将 2.3 应用程序升级到 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 ]
}