Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-359

Document alternatives to restricted query operators for countDocuments()

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 1.4.0
    • Docs
    • None

    Description

      With the deprecation of the count() and command users will be asked to move to the use of countDocuments() and estimatedDocumentCount() helpers.

      The deprecation messaging in the api and deprecation warning should mention the restrictions on using the following commands/operators in the query/filter of the count and the countDocuments helpers.

      restricted -> replacement:

      $where -> $expr
      $near -> $geoWithin with $center
      $nearSphere -> $geoWithin with $centerSphere

      Also note that $expr requires MongoDB 3.6+
       

       

      Attachments

        Issue Links

          Activity

            People

              jmikola@mongodb.com Jeremy Mikola
              rathi.gnanasekaran Rathi Gnanasekaran
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: