【问题标题】:Issues with GRAILS UUID and PSQLGRAILS UUID 和 PSQL 的问题
【发布时间】:2015-06-26 20:22:21
【问题描述】:

我正在尝试在 grails 2.4.4、PSQL 版本 9.4.4 上使用 UUID2 生成器。我当前的模型设置是。

class ClassA {

   UUID id

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

class ClassB extends ClassA {

    static constraints = {
    }

    static mapping = {
    }
}

但是当我执行运行应用程序时,我总是会出错。

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

任何想法我做错了什么?

【问题讨论】:

    标签: grails grails-orm uuid psql


    【解决方案1】:

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

    enter link description here

    【讨论】:

      猜你喜欢
      • 2013-02-07
      • 1970-01-01
      • 1970-01-01
      • 2020-07-16
      • 2022-01-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多