0
У меня Alert
есть много объектов Location
, и у меня есть таблица соединений alert_locations
.Grails Join Table column name
Генерируемые столбцы:
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)
}
}
возможно дубликат [Grails таблица контроля соединения] (http://stackoverflow.com/question s/8897524/Grails-контроль, нарисуйте таблицу) –