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

$inc should support documents

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

      If you have nested counters in a document you have always specify the full path to update them.

      update(

      {id:1}

      , {
      'some.path.into1' : 1,
      'some.path.into2' : 1,
      })

      this quickly becomes quite verbose. Using a document for this would feel natural.

      update(

      {id:1}

      , { '$inc': { 'some' : { 'path' :

      { 'into1' : 1, 'into2' : 1, }}

      }})

      the increment would be on all leaf nodes that are of type int

            Assignee:
            Unassigned Unassigned
            Reporter:
            tcurdt Torsten Curdt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: