我正在研究 Grails GORM。我有一个基域类,如下所示:
abstract class BaseDomain {
String createdBy
String updatedBy
static constraints = {
}
}
和扩展类如下:
class Customer extends BaseDomain {
String name
String address1
String address2
String city
String state
String zip
String phone
static constraints = {
}
}
当我执行 run-app 时,会创建一个名为:BASE_DOMAIN 的表
我添加了以下内容来更改表名:
static mapping = {
table 'customer_table'
}
它抛出以下异常:
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name '(inner bean)#2': Invocation of init method
failed; nested exception is org.hibernate.DuplicateMappingException:
Duplicate class/entity mapping com.samples.Customer
... 3 more
Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.samples.Customer
谁能让我知道如何解决这个问题。