Grails' GORM constraint question
- by xain
Hi, I have the following Domain Class:
class Metric {
String name
float value
static belongsTo = [Person,Corporation]
static indexes = {
name()
}
}
How can I add a constraint so Person,Corporation and name are unique ?
Thanks.