Grails: Prevent cascading association between two domain classes with multiple relationships

前端 未结 3 548
攒了一身酷
攒了一身酷 2021-01-28 13:12

Consider two domain classes; Job and Quote.

A Job has many Quotes but a Job also has an accepted quote. The accepted quote is nullable and should only be set once a part

3条回答
  •  梦毁少年i
    2021-01-28 13:53

    Take a look at hasOne and belongsTo association configuration. Take a look at cascade to learn more about cascade behaviour configuration.

提交回复
热议问题