Posts

Showing posts with the label hint
This is what we are looking to update db.getCollection('location').find({"correlationId.correlation":"MN09"}) Result: { "_id" : ObjectId("4523452345235234"), "correlationId" : { "correlation" : "MN09" }, "sortSequence" : 120, "code" : "MN09", "description" : "Manhattan 9", "legacyZone" : "West", "locationTypeId" : { "correlation" : "DISTRICT" }, "garageCode" : "MW09G", "servicesSelf" : true, "servicedBy" : [ { "correlation" : "MN12" } ], "workUnit" : { "correlation" : "MNBO" } } we would like to do a find and update on "servicedBy" : [ { "correlation" : "MN12" } ] using db.getCollection('location').update( {"correlationId.correlation":"MN09"}, { $set : { ...