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

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

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • 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@mongodb.com Asya Kamsky
            Reporter:
            karo Karolin Varner
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: