如何为多个列创建命名唯一约束?
我有三个类:
我有三个类:
class Descriptor {
// some columns
}
class Protein {
// some columns
}
class DescriptorValue {
// some columns
static belongsTo = [protein: Protein, descriptor: Descriptor]
static constraints = {
protein(unique:['descriptor'])
}
}
GORM会为不同的环境创建具有自动生成名称的索引。如何指定其名称?