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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -