The GitHub Actions job "CI" on 
grails-core.git/fix/gorm-bean-validation-constraints has failed.
Run started by GitHub user jdaugherty (triggered by jdaugherty).

Head commit for run:
2894f420ce1b10bf5546455f034c8228d8cc7d25 / James Daugherty 
<[email protected]>
Validate the constraints block of Bean Validation annotated domain classes and 
expose their constraints

A domain class carrying a jakarta.validation annotation is validated by
Hibernate Validator through GormValidatorAdapter, which until now replaced
GORM's own validator entirely: the constraints block was ignored for
validation while it still defined the schema, the validator exposed no
constraint metadata (it was not a ConstrainedEntity, so constrainedProperties
was empty for scaffolding and plugins), null values were never reached by
@NotNull and friends because the traversable resolver treated a null
property as uninitialized, class level constraints were skipped for the
same reason, and the unit test datastore ignored the annotations altogether.

GormValidatorAdapter now also runs the PersistentEntityValidator of the
entity, with the GORM nullable constraint relaxed for properties whose
nullability is declared by an annotation so a null value is reported once,
and implements ConstrainedEntity with the constraints block merged with a
description of the annotations as GORM constraints 
(JakartaConstraintsTranslator).
Bean Validation no longer cascades when the GORM validator does, so
associations are validated once. JakartaValidatorRegistry caches the
validator per entity. MappingContextTraversableResolver treats a null value
and a class level node as reachable. DataTest creates the same combined
validator for annotated domain classes.

Documented in a new Bean Validation Annotations section of the validation
guide and in the 8.0.x upgrade notes.

Report URL: https://github.com/apache/grails-core/actions/runs/38265171526

With regards,
GitHub Actions via GitBox

Reply via email to