You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example that reproduces the problem uploaded to Github
Full description of the issue provided (see below)
Steps to Reproduce
Run CustomerSpec.groovy
Note the Customer domain class includes a Long firmId field with a non-nullable constraint.
Note the Customer domain class implements MuiltiTenant and a mapping for the tenantId to the firmId field.
Expected Behaviour
Running the test will attempt to save an instance of the Customer class without setting the mandatory firmId field. This should throw a validation exception.
Actual Behaviour
A ValidationException is not thrown. On inspection via a debugger, we can see in the Gorm DefaultConstraintEvaluator, the firmId field is considered a 'derived' property and as a result is removed from the list of properties to be constrained. Therefore validation never takes place.
Task List
Steps to Reproduce
Expected Behaviour
Running the test will attempt to save an instance of the Customer class without setting the mandatory firmId field. This should throw a validation exception.
Actual Behaviour
A ValidationException is not thrown. On inspection via a debugger, we can see in the Gorm DefaultConstraintEvaluator, the firmId field is considered a 'derived' property and as a result is removed from the list of properties to be constrained. Therefore validation never takes place.
Environment Information
Example Application
The text was updated successfully, but these errors were encountered: