私Alert
には多くのLocation
オブジェクトがあり、結合テーブルがありますalert_locations
。
生成される列は次のとおりです。
alerts_locations_id
(こうありたいalert_id
)
location_id
これが私のドメインオブジェクトです:
class Alerts {
static hasMany = [locations:Locations,notifications:Notifications]
Date alertDateTime
String pest
String crop
static constraints = {
alertDateTime (blank:false)
pest (blank:false)
crop (blank:false)
}
}