GORM列映射不遵循数字前的下划线

时间:2016-06-07 18:30:09

标签: grails gorm grails-3.1

我的表格中有一列名为HDR_PROSHIP_REFERENCE_1,而mapping位于以下域:

static mapping = {
    table 'ORDER_LINE'
    version false
    id column: 'LINE_ID', insertable: 'false', updateable: 'false'
    proshipReference1 column: 'HDR_PROSHIP_REFERENCE_1'
    proshipReference2 column: 'HDR_PROSHIP_REFERENCE_2'
}

然而,当GORM针对此构建查询时,SQL会抛出invalid identifier

ORA-00904: "THIS_"."HDR_PROSHIP_REFERENCE2": invalid identifier

看起来GORM在默认情况下对camelcase列的努力并不尊重' _'在数字之前。

这是GORM的错误还是我没有正确编写映射?

0 个答案:

没有答案