Appends the given elements to the current document, or update the value for an already known field to maintain unicity.
Appends the given elements to the current document, or update the value for an already known field to maintain unicity.
reactivemongo.api.bson.BSONDocument( "foo" -> 1, "bar" -> 2) ++ ("foo" -> 4) // { 'foo': 4, 'bar': 2 }
Concatenate the two documents, maintaining field unicity by keeping only the last value per each name.
Concatenate the two documents, maintaining field unicity by keeping only the last value per each name.
import reactivemongo.api.bson.BSONDocument BSONDocument("foo" -> 1, "bar" -> 2) ++ BSONDocument("foo" -> 4) // { 'foo': 4, 'bar': 2 }
EXPERIMENTAL: Strict documentation representation with at most one value per field name (no duplicate).