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) {