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

Passing $currentDate : { date : false } still updates the field to current date

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Write Ops
    • ALL

    Description

      { "_id" : ObjectId("525847b17bb5149dea3bb079"), "n" : 5 }
      > db.foo.update({ n : 5 }, {$currentDate: {date : false }})
      { "_id" : ObjectId("525847b17bb5149dea3bb079"), "n" : 5, "date" : ISODate("2013-10-15T17:35:11.465Z") }

      Behavior is not intuitive as I expect date field not to be set in this case.

      Attachments

        Activity

          People

            scotthernandez Scott Hernandez (Inactive)
            amalia.hawkins@10gen.com Amalia Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: