Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-3449

Doc that $where must be top-level

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • v1.3.7
    • None
    • manual
    • None

    Description

      2.6 strictly enforces that a $where query operator must be a field of the top-level document. It cannot be inside a nested document (for instance, below an $elemMatch). Can we add this as a note here: http://docs.mongodb.org/manual/reference/operator/query/where/?

      2.4 erroneously allowed $where inside an $elemMatch value, so it might be worth tagging this as "changed in 2.6".

      See relevant core server tickets for details: SERVER-13503, SERVER-12439, and SERVER-14010.

      Attachments

        Activity

          People

            tim.slavin Tim Slavin
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 35 weeks ago