4

grails with postgres for User domain.

 Message: ERROR: column this_.id does not exist
suresh goud
  • 367
  • 1
  • 3
  • 19

3 Answers3

7

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.

suresh goud
  • 367
  • 1
  • 3
  • 19
5

The word 'user' may be reserved by dbms.

static mapping = {
    table '`User`'
    password column: '`password`'
}
Onoroco
  • 53
  • 1
  • 5
0

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"
FreeStyler
  • 186
  • 2
  • 8