Grouping constraints in domain objects

143 Views Asked by At

Is there a way to group domain object constraints? Something like this:

static constraints = {
    personalDetails {
        firstName(nullable: false)
    }
    address {
        street(nullable: false)
    }
}

Rich domain plugin does this for NON-domain objects... I want to do this FOR domain objects.

1

There are 1 best solutions below

0
On

As i know this format does not supported by Grails. May be shared constraints will help you.