File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,23 @@ for details on driver options.
296
296
# existing method. (default: false)
297
297
scope_overwrite_exception: false
298
298
299
+ # In Mongoid 7.3.3 and earlier, when setting an embedded document, setting
300
+ # it to nil, and then setting it again to that same original value, the
301
+ # second update would not work and the value for the embedded document
302
+ # would remain nil. Take this case:
303
+ #
304
+ # canvas.palette = palette
305
+ # canvas.palette = nil
306
+ # canvas.palette = palette
307
+ # Where canvas embeds_one palette.
308
+ #
309
+ # In 7.3.3 and earlier, canvas.palette would be nil when we would expect
310
+ # it to be palette. Since fixing this would be a breaking change, we have
311
+ # put this fix behind this feature flag. Turning this flag on fixes this
312
+ # bug, and canvas.palette would contain the correct value: the assigned
313
+ # palette. (default: false)
314
+ update_embedded_after_nil: false
315
+
299
316
# Use ActiveSupport's time zone in time operations instead of
300
317
# the Ruby default time zone. See the time zone section below for
301
318
# further information. (default: true)
You can’t perform that action at this time.
0 commit comments