Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-10079

Cannot use $query together with $comment

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Query
    • ALL

      I wanted to use the special $comment field with pymongo for adding generic information about what code triggered the query.

      To do this you need to do collection.find(

      {"$query": ..., "$comment": ...}

      ).
      But this breaks queries trying to count, always giving 0 as result.

      Same goes for the cli.

      This makes the usability of $comment much more complicated since you need to keep track of when your code might count on the cursor.

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            balboah Johnny Boy
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: