-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 7.4.0
-
Component/s: Persistence
-
None
7.4.0 introduced an undocumented breaking change to Model#set. Assuming a User model with external_ids field of type Hash, and a record with an existing value of `{ a: 1 }`
Set command:
user.set(external_ids: { b: 2 })
v7.3.x
=> #<User external_ids: { a: 1, b: 2 }>
v7.4.0
=> #<User external_ids: { b: 2 }>
So it seems like 7.4.x is now completely replacing the value rather than merging. Granted, this is more inline with how it should probably work, but breaking changes like this should be behind a toggle like the rest of the 7.4 changes until they are swapped in 8.0.
- duplicates
-
MONGOID-5279 Undocument Model#set breakage in 7.4.0
- Closed