When using a Java domain model with inheritance and supplying the WhateverContraints.groovy files, constraints are not inherited for extending classes, eg:
has "AConstraints.groovy", which are invoked for validate()
class B extends A
does not have any constraints of it's own, and nothing is used for validate() so I get raw DB errors when trying to save invalid objects
In my case class B was not providing any new DB columns that A did not have itself, although it does have a few extra properties, which are represented by different DB tables. So I thought it would be reasonable that B should inherit constraints from A.
Also, is it worth considering the situation where a developer might want to inherit superclass constraints and override some of them too?