Skip to content

Commit 768546c

Browse files
p-mongop
andauthored
MONGOID-4791 Support logical operators under $elemMatch when embedded matching (#4832)
Co-authored-by: Oleg Pudeyev <oleg@bsdpower.com>
1 parent 7a31957 commit 768546c

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

source/tutorials/mongoid-relations.txt

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -583,11 +583,24 @@ tours on a loaded band:
583583
band = Band.where(name: 'Astral Projection').first
584584
tours = band.tours.where(year: {'$gte' => 2000})
585585

586-
.. note::
586+
Embedded Matching Vs Server Behavior
587+
````````````````````````````````````
587588

588-
Mongoid aims to provide the same semantics when performing embedded matching
589-
as those of MongoDB server. This means, for example, that embedded matchers
590-
generally support arguments of the same types as ``Criteria`` methods do.
589+
Mongoid aims to provide the same semantics when performing embedded matching
590+
as those of MongoDB server. This means, for example, that embedded matchers
591+
generally support arguments of the same types as ``Criteria`` methods do.
592+
593+
The following deviations are known:
594+
595+
- Mongoid embedded matchers behave identically regardless of the server version
596+
that backs persistence operations and server queries. As such, it is
597+
possible for Mongoid to deviate from server behavior if the server itself
598+
behaves differently in different versions.
599+
600+
As of this writing, the only known case of such deviation is 3.2 and
601+
earlier server versions not validating ``$size`` arguments as strictly as
602+
newer versions do. Mongoid adopts the behavior of current server versions
603+
and validates more strictly.
591604

592605

593606
Common Behavior

0 commit comments

Comments
 (0)