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

can't push and set in one operation

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Won't Do
    • None
    • None
    • 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

              backlog-server-query Backlog - Query Team (Inactive)
              dwight@mongodb.com Dwight Merriman
              Votes:
              24 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: