开发者

Changing GORM table name

开发者 https://www.devze.com 2023-01-03 17:11 出处:网络
I\'m fighting to get the following mapping working in Grails 1.3.1 and MySQL: class Login { int id String email

I'm fighting to get the following mapping working in Grails 1.3.1 and MySQL:

class Login {

    int id
    String email

    static mappings = {
        table 'my_table'
        id column: "Mgr_id"
        version false
    }
}

No matter what I do the q开发者_JAVA技巧ueries that are being issued refer to "schema.login" table instead of "schema.my_table". This is very frustrating... Can anyone answer why this might not be working?


Please forgive my blindness... The static is called mapping not mappings... eh. Shame on me...

Block should be

static mapping = {
    table 'my_table'
    id column: "Mgr_id"
    version false
}
0

精彩评论

暂无评论...
验证码 换一张
取 消