The GitHub Actions job "CI - Groovy Joint Validation Build" on 
grails-core.git/7.1.x-mongo-id-fix has succeeded.
Run started by GitHub user codeconsole (triggered by codeconsole).

Head commit for run:
e50bf4ff42e03bf6e52769246939f4e2a6174ff6 / Scott Murphy Heiberg 
<[email protected]>
fix(mongo): persist single-valued embedded null→non-null transitions

PersistentEntityCodec.encodeUpdate silently dropped the recursive encode
of non-DirtyCheckable embedded values (there was a "TODO: Support
non-dirty checkable objects?" in the else branch). Result: when a caller
assigned a new embedded instance to a previously-null property and then
save(flush:true)'d, the parent's $set never included the embedded
sub-document, so nothing landed in Mongo even though save() returned a
non-null persisted instance.

When we are encoding an embedded update and the value lacks dirty
tracking, fall back to encoding every persistent property; the caller's
encodeEmbeddedUpdate then $set's them onto "<assocName>.<prop>" paths
exactly as the DirtyCheckable path does.

Adds SingleEmbeddedAssignNullToNonNullSpec covering three variants:
POGO embedded (the regression), @Entity embedded, and a top-level scalar
save control on the parent.

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

With regards,
GitHub Actions via GitBox

Reply via email to