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

not allowed to $push and $pop to same field in same update

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Won't Do
    • 1.4.0
    • None
    • Write Ops
    • None

    Description

      Was just talking about #991 with Dwight and noticed that you can't workaround by doing $push / $pop to the same field on the same update, for example:

      > db.test.drop();
      false
      > db.test.save(

      { mylist: [1,2] }

      );
      > db.test.update( {}, { $push:

      { mylist: 3 }

      , $pop:

      { mylist: -1 }

      } );
      Field name duplication not allowed with modifiers

      Would be nice if this was permitted.

      Attachments

        Issue Links

          Activity

            Dates

              Created:
              Updated:
              Resolved: