2011-07-05 24 views

回答

4

使用的belongsTo地图形式创建这些名称的字段,这样你就可以

static constraints = { 
    ownerB unique: 'ownerC' 
} 
0
String field1 
String field2 
Integer field3 
SomeObject object 

    static constraints = { 
     object unique: ['field1','field2', 'field3'] 
    }