groovy - Grails Join Table column name -
groovy - Grails Join Table column name -
my alert
has many location
objects, , have bring together table alert_locations
.
the generated columns are:
alerts_locations_id
(i want alert_id
)
location_id
here's domain object:
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) } }
static mapping = { locations jointable:[column:"location_id", key:"alert_id"]
grails groovy gorm jointable
Comments
Post a Comment