Hi!
I have a Grails application with a -simplified - domain class which looks like this:
class Capacity {
static constraints = {
month(blank:false, nullable:false)
company(blank:false, nullable:false)
}
Date month
Company company
String note
...
}
The pair month-company must be unique. (I.e. they should be primary key at the DB).
How can I define such a constraint?
Thanks a lot in advance
Luis