【问题标题】:grails postgres Message: ERROR: column this_.id does not existgrails postgres 消息:错误:列 this_.id 不存在
【发布时间】:2015-10-29 06:58:50
【问题描述】:

用于用户域的带有 postgres 的 grails。

 Message: ERROR: column this_.id does not exist

【问题讨论】:

    标签: postgresql grails


    【解决方案1】:

    有问题。 对于用户域,我将 postgres 表设置为“用户”。因此,默认情况下,当它尝试查询用户表时,它不会使用“user.id”进行查询。 “用户”表的 postgres 有问题。

    所以我将“user”表更新为“myapp_user”表。问题解决了。

    【讨论】:

      【解决方案2】:

      “用户”一词可能被 dbms 保留。

      static mapping = {
          table '`User`'
          password column: '`password`'
      }
      

      【讨论】:

        猜你喜欢
        • 2018-05-03
        • 1970-01-01
        • 2017-12-23
        • 2022-08-15
        • 2012-11-12
        • 2019-01-16
        • 1970-01-01
        • 2014-01-29
        • 1970-01-01
        相关资源
        最近更新 更多