From 84352d4196dfb070b25f22cb2a1dbe0e9b200f0d Mon Sep 17 00:00:00 2001 From: Dan Dascalescu Date: Fri, 16 May 2014 22:20:15 -0700 Subject: [PATCH] Specify what happens in the case of object comparisons Per discussion at https://groups.google.com/forum/#!topic/mongodb-user/agmQu_qFllM --- source/reference/operator/update/addToSet.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/reference/operator/update/addToSet.txt b/source/reference/operator/update/addToSet.txt index 19a2f7751d3..9fcb78ace3b 100644 --- a/source/reference/operator/update/addToSet.txt +++ b/source/reference/operator/update/addToSet.txt @@ -63,6 +63,10 @@ Behavior array as a *single* element. To add each element of the value separately, use :update:`$addToSet` with the :update:`$each` modifier. See :ref:`addToSet-modifiers` for details. + +- If the value is an object, it will be deep-compared with every + element in the array. It is currently not possible to specify + particular keys to match against or ignore. .. _addToSet-modifiers: