Skip to content

Commit d231e3b

Browse files
authored
backport adds a new include which, at this point, is only used in 1 file (#5775)
1 parent 12df48f commit d231e3b

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

source/core/document.txt

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,7 @@ names:
8989

9090
.. include:: /includes/fact-document-field-name-restrictions.rst
9191

92-
BSON documents may have more than one field with the same name.
93-
Most :driver:`MongoDB interfaces </>`, however, represent MongoDB
94-
with a structure (e.g. a hash table) that does not support duplicate
95-
field names. If you need to manipulate documents that have more than one
96-
field with the same name, see the :driver:`driver documentation
97-
</>` for your driver.
98-
99-
Some documents created by internal MongoDB processes may have duplicate
100-
fields, but *no* MongoDB process will *ever* add duplicate fields to an
101-
existing user document.
92+
.. include:: /includes/warning-document-duplicate-key-names-body.rst
10293

10394
Field Value Limit
10495
~~~~~~~~~~~~~~~~~
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
The MongoDB Query Language does not support documents with duplicate
2+
field names. While some BSON builders may support creating a BSON document with
3+
duplicate field names, inserting these documents into MongoDB is not supported
4+
*even if* the insert succeeds, or appears to succeed. For example, inserting a
5+
BSON document with duplicate field names through a MongoDB driver may result in
6+
the driver silently dropping the duplicate values prior to insertion, or may
7+
result in an invalid document being inserted that contains duplicate fields. Querying against any such documents would lead to arbitrary and inconsistent results.

0 commit comments

Comments
 (0)