You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by GitBox <gi...@apache.org> on 2026/05/29 08:50:56 UTC
[GH] (grails-core/fix/constraint-overwrites-mapping-index): Workflow run "Code Style" failed!
The GitHub Actions job "Code Style" on grails-core.git/fix/constraint-overwrites-mapping-index has failed.
Run started by GitHub user codeconsole (triggered by codeconsole).
Head commit for run:
365956bb4f690eb921079ea9d4c5e699281f19cb / Scott Murphy Heiberg <sc...@alwaysvip.com>
Fix constraints overwriting mapping index configuration (#15680)
When a domain property has both `index: true, indexAttributes: [unique: true]`
in `static mapping` and `unique: true` in `static constraints`, the constraint
evaluation overwrites the mapping-configured property. The root cause is in
`DefaultMappingConfigurationBuilder.getProperties()` which uses `putAll` to
merge `Entity.propertyConfigs` (populated by constraint evaluation) over
`builder.properties` (populated by mapping evaluation), destroying the
mapping-set `index` and `indexAttributes` values.
The fix changes `getProperties()` to use `putIfAbsent` semantics — properties
already configured by the mapping closure are preserved when the constraint
closure provides a conflicting entry.
Test: DefaultMappingConfigurationBuilderSpec verifies that mapping-set index
properties survive constraint evaluation.
Report URL: https://github.com/apache/grails-core/actions/runs/26627339739
With regards,
GitHub Actions via GitBox