GRAILS UUID和PSQL的问题

GRAILS UUID和PSQL的问题,grails,gorm,uuid,psql,Grails,Gorm,Uuid,Psql,我试图在Grails2.4.4、PSQL版本9.4.4上使用UUID2生成器。我当前的模型设置是 class ClassA { UUID id static mapping = { id generator:'uuid2', name:'uuid2', type:'pg-uuid' tablePerHierarchy false } } 及 但当我执行run应用程序时,总是会出现错误 ERROR context.GrailsContextLoa

我试图在Grails2.4.4、PSQL版本9.4.4上使用UUID2生成器。我当前的模型设置是

class ClassA {

   UUID id

   static mapping = {
       id generator:'uuid2', name:'uuid2', type:'pg-uuid'
       tablePerHierarchy false
   }
}

但当我执行run应用程序时,总是会出现错误

ERROR context.GrailsContextLoaderListener-初始化应用程序时出错:评估域[ClassB]的ORM映射块时出错:null 消息:评估域[ClassB]的ORM映射块时出错:null


知道我做错了什么吗?

UUID
重命名为
UUID-uuid2
或删除
name:uuid2
。据我所知,使用映射中的name,您可以将id生成器分配给您的一个属性

class ClassB extends ClassA {

    static constraints = {
    }

    static mapping = {
    }
}