Grouping constraints in domain objects

112 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 answers

0
jenk On

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