From 9b9d756373a7c3d9d62b971576e3cd0276d7e5ed Mon Sep 17 00:00:00 2001 From: kenjifujita Date: Wed, 29 Nov 2023 09:18:07 -0500 Subject: [PATCH] Persist null updates on embedded fields --- .../mapping/mongo/engine/codecs/PersistentEntityCodec.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-datastore-gorm-mongodb/src/main/groovy/org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.groovy b/grails-datastore-gorm-mongodb/src/main/groovy/org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.groovy index 8a63a452..ce294b15 100644 --- a/grails-datastore-gorm-mongodb/src/main/groovy/org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.groovy +++ b/grails-datastore-gorm-mongodb/src/main/groovy/org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.groovy @@ -436,7 +436,7 @@ class PersistentEntityCodec extends BsonPersistentEntityCodec { v.markDirty() } - def embeddedUpdate = encodeUpdate(v) + def embeddedUpdate = encodeUpdate(v, createEntityAccess(v), DEFAULT_ENCODER_CONTEXT, true) def embeddedSets = embeddedUpdate.get(MONGO_SET_OPERATOR) if(embeddedSets != null) {