fltxiaotaoer
2016-06-01 09:56
采纳率: 100%
浏览 1.1k
已采纳

Grails组合键报错 no generator CompositeIdentity

问一个组合键的问题, 类定义是这样的:
class A{
String id
static hasMany = [b: B]
}
class B implements Serializable {
def A a1
def A a2
static belongsTo = [a1: A, a2: A]
static hasMany = [a1: A, a2: A]
static mapping = {
id composite: ['a1','a2']
}

equals和hashCode方法...

}

问题是: 报错 No such property: generator for class: org.codehaus.groovy.grails.orm.hibernate.cfg.CompositeIdentity,
怎么办?

1条回答 默认 最新

相关推荐 更多相似问题