Skip to content

Commit 064293d

Browse files
p-mongop
andauthored
MONGOID-5350 Add documentation warning about potentially incorrect query construction (#5348)
Co-authored-by: Oleg Pudeyev <[email protected]>
1 parent 1f075db commit 064293d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/reference/queries.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,16 @@ Since ``ne`` does not support merge strategies, the ``union`` strategy was
575575
ignored and reset and when ``in`` was invoked the second time there was no
576576
strategy active.
577577

578+
.. warning::
579+
580+
Merge strategies currently assume the previous condition(s) have been added
581+
to the top level of the query, however this is not always the case
582+
(conditions may be nested under an ``$and`` clause). Using merge strategies
583+
with complex criteria may cause incorrect queries to be constructed.
584+
This misbehavior is `intended to be fixed in the future
585+
<https://jira.mongodb.org/browse/MONGOID-5350>`_.
586+
587+
578588
Supported Operator Methods
579589
--------------------------
580590

0 commit comments

Comments
 (0)