$size for objects (implementing update-if-current/atomics)

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      It would be nice if the $size operator supported objects!

      This would specifically be handy for implementing the update-if-current idom; e.g. one could match the following subdocument exactly and order-indipentantly:

      Document:

      {
        _id: 1,
        my_doc: {
          name: "Ford Prefect",
          occupation: "Writer"
        }
      }
      

      Query:

      {
        _id: 1,
        "my_doc.name": "Ford Prefect",
        "my_doc.occupation": "Writer",
        my_doc: {$size: 2}
      }
      

              Assignee:
              Asya Kamsky
              Reporter:
              Karolin Varner
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: