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

Comment on: "manual/reference/operator/update/pull.txt"

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None

    Description

      $gte should be $lte or the example should be updated

      --------
      The following operation will remove all items from the votes array that are greater than or equal to ($gte) 6:

      db.profiles.update(

      { _id: 1 }

      , { $pull: { votes:

      { $gte: 6 }

      } } )

      After the update operation, the document only has values less than 6:

      Attachments

        Activity

          People

            steve.renaker@mongodb.com Steve Renaker (Inactive)
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 9 weeks, 6 days ago