can't push and set in one operation

XMLWordPrintableJSON

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

      > 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

            Assignee:
            Backlog - Query Team (Inactive)
            Reporter:
            Dwight Merriman
            Votes:
            24 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved: