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

can't push and set in one operation

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Write Ops

      Description

      > t.find()
      { "_id" : 3, "version" : 1, "versionsCount" : 1, "name" : "TestName1", "versions" : [

      { "version" : 1, "versionFromInstant" : 33, "versionToInstant" : 99, "name" : "TestName1", "value" : "A" }

      ] }
      > q

      { "_id" : 3, "versions.version" : 1 }

      > u
      {
      "$set" :

      { "version" : 2, "name" : "NEWNAME", "versions.$.versionToInstant" : 1000 }

      ,
      "$inc" :

      { "versionsCount" : 1 }

      ,
      "$push" : {
      "versions" :

      { "z" : "anewone" }

      }
      }
      > t.update(q,u)
      have conflicting mods in update

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-query Backlog - Query Team (Inactive)
              Reporter:
              dwight_10gen Dwight Merriman
              Participants:
              Votes:
              24 Vote for this issue
              Watchers:
              21 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: