Grails - adding custom fields (columns) to all domain objects - automatically

前端 未结 3 340
自闭症患者
自闭症患者 2021-01-22 04:50

By default when you create a domain class, it will automatically add \"id\" and \"version\" column for all the domain classes (tables). What if I want to add a column say for e.

3条回答
  •  清歌不尽
    2021-01-22 05:48

    I would recommend creating a plugin that modifies (adds the property) your domain artifacts. You can read more about plugins and artifacts. You could then easily add a static property (e.g. static nochecked = true) to filter out domain artifacts you don't want to add the new property to as you see fit.

提交回复
热议问题