domain 用jointable 设置外键 一直是默认的ID 不能自定义,我用的是Grails API ,Domain 如下:
class SatisfyForMer {
String qTitle
int qType
static hasMany = [questions: Questions]
static constraints = {
}
static mapping ={
// version false
// id generator:"sequence" ,column:"sid",params:[sequence:"seq_faq"]
id generator:"identity" ,column:"sid"
table "mer_satisfy"
questions joinTable: [column: 'qType']
}
}
红色部分是我要设置的外键,但是grails 一直用默认这个类的ID,questions joinTable: [column: 'qType'] 在这里没起作用啊。帮忙看看,大侠们