GORM domain class properties default values

前端 未结 1 760
野性不改
野性不改 2021-02-13 05:52

Maybe a silly question but where/how should I define default values for GORM domain class properties? For example when I\'m creating a new Company object instance I want default

相关标签:
1条回答
  • 2021-02-13 06:25

    Put it in the domain class itself

    class Company {
        String country = "USA"
    }
    
    0 讨论(0)
提交回复
热议问题