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

$inc should support documents

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • 1.7.1
    • None
    • Querying
    • None

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: