You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I will consider it as full duplicate of #5078 and it will available in the next release(which will hopefully happen on Tuesday 31-03. For deletion, you will need to use set as you can't uniquely identify them and there can be duplicates so it will be application specific logic.
Problem
This results in a less pleasant developer experience as well as potential data loss from race conditions.
Suggested solution
Add
push
(add elements) andpull
(remove elements) operators.Maybe also a
pop
operator.Some thought should be put into the syntax used to push 1 element or 1+ elements. MongoDB uses an object with the
$each
operator:Additional context
Database documentation for array updates:
The text was updated successfully, but these errors were encountered: