Grails域已映射到不需要的_IDX列

时间:2018-12-05 08:44:33

标签: hibernate grails gorm grails3

我的一个Grails域中,“组织”无法保存在我们的数据库中,因为它希望该表包含一列“ ORGANISATION_IDX”。但是,我在项目中还有其他领域,但都没有这个问题。

@EqualsAndHashCode // this is the only domain having this annotation, but commenting it doesn't solve the issue
class Organisation {
    SomeClass someClass

    SomeDomain someDomain

    // some additional String and Date fields

    static embedded = ['someClass']
    static hasOne = ['someDomain': SomeDomain]

    static constraints = {
        // some constaints for my fields    
    }

    static mapping = {
        table name: 'MY_DOMAIN', schema: 'MY_SCHEMA'
        datasource 'my_domains'

        id column 'DOMAIN_ID', generator: 'sequence', params: [sequence: 'MY_SEQUENCE', schema: 'MY_SCHEMA']

        autoTimestamp true
        version false
    }
}

为什么在此域而不是另一个域发生这种情况?如何确保休眠状态消除对具有“ ORGANISATION_IDX”列的期望?

0 个答案:

没有答案