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

Add on modified option to $currentDate

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Write Ops
    • Labels:
      None

      Description

      $currentDate will set the current date regardless of whether the document was otherwise modified.

      It would be helpful to have an option to set the current time only if fields other than those specified in $currentDate are changed from their original values as returned in the nModified count, similar to MySQL's ON UPDATE CURRENT_TIMESTAMP.

      Using change streams or tailing oplog could accomplish such, but requires replication.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              daniel.hatcher Danny Hatcher (Inactive)
              Reporter:
              bryanleepartstree Bryan Lee
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: