suresh goud
suresh goud

Reputation: 367

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

grails with postgres for User domain.

 Message: ERROR: column this_.id does not exist

Upvotes: 4

Views: 2274

Answers (3)

FreeStyler
FreeStyler

Reputation: 317

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"

Upvotes: 0

Onoroco
Onoroco

Reputation: 53

The word 'user' may be reserved by dbms.

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

Upvotes: 5

suresh goud
suresh goud

Reputation: 367

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.

Upvotes: 7

Related Questions