简体   繁体   中英

grails postgres Message: ERROR: column this_.id does not exist

grails with postgres for User domain.

 Message: ERROR: column this_.id does not exist

Got the issue. For User domain, I've postgres table as "user". So by default when it is trying to query user table, its not querying with "user.id". There is something wrong with postgres for "user" table.

So I updated my "user" table to "myapp_user" table. The problem got solved.

The word 'user' may be reserved by dbms.

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

I think it's because table name user already occupied by defalut by Postgres. Try query w/ schema ( public by default) like in phpPgAdmin :

SELECT * FROM "public"."user"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM