Skip to content

Commit 306fe4a

Browse files
authored
MONGOID-5235 Add Feature Flag: Reloading retains stale changed value (#5139)
* MONGOID-5235 add feature flag and tests * MONGOID-5235 write up docs for new feature flag
1 parent b95e55c commit 306fe4a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

source/reference/configuration.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,23 @@ for details on driver options.
296296
# existing method. (default: false)
297297
scope_overwrite_exception: false
298298

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+
299316
# Use ActiveSupport's time zone in time operations instead of
300317
# the Ruby default time zone. See the time zone section below for
301318
# further information. (default: true)

0 commit comments

Comments
 (0)