Advertisement
Guest User

TSergey, 2014-09-03, mongo-update

a guest
Sep 3rd, 2014
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. > db.noc.inv.networkchartstate.find({"object" : "2" })
  2. { "_id" : ObjectId("540696a24a5e681065c01270"), "chart" : 1, "object" : "2", "state" : { "y" : 170, "h" : 40, "w" : 40, "x" : 160 }, "type" : "mo" }
  3. { "_id" : ObjectId("5406a0354a5e681065c0127d"), "state" : { "y" : 90, "h" : 40, "w" : 40, "x" : 920 }, "object" : "2", "type" : "mo", "chart" : 4 }
  4. > db.noc.inv.networkchartstate.update({"object" : "2"}, {$set: {"state" : { "y" : 370, "h" : 40, "w" : 40, "x" : 160 }}}, { multi: true });
  5. > db.noc.inv.networkchartstate.find({"object" : "2" })
  6. { "_id" : ObjectId("540696a24a5e681065c01270"), "chart" : 1, "object" : "2", "state" : { "y" : 370, "h" : 40, "w" : 40, "x" : 160 }, "type" : "mo" }
  7. { "_id" : ObjectId("5406a0354a5e681065c0127d"), "state" : { "y" : 90, "h" : 40, "w" : 40, "x" : 920 }, "object" : "2", "type" : "mo", "chart" : 4 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement