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

update the data based on old values and new values with the same Unique Key

    XMLWordPrintable

    Details

    • Type: Question
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I have the problem
      e.g. I already have a record in the mongodb as
      { "_id" :

      { "$oid" : "512dd8a3ac84a6e6e1af99c8"}

      , "id" : 200 , "name" : "ESN000200" , "msg" : "hello world 298374" , "txPacket" : 445, "status": "up", "statusChanged": "yes" }
      now I need to update this record.
      I have to update the statusChanged field only if the status is changed else not.
      what should be the better way to do this..?? I don't have previous information anywhere apart from this collection. What I can think of is get the value match and then put again but this will reduce the speed of updation. I need some oracle trigger like functionality

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: