0
我的Alert
有很多Location
对象,我有连接表alert_locations
。Grails加入表列名
生成的列有:
alerts_locations_id
(我想这是alert_id
)
location_id
这里是我的域对象:Grails的的
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)
}
}
可能重复控制连接表](http://stackoverflow.com/question S/8897524/Grails的控制联接表) – 2012-01-17 16:51:28