Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{_id:ObjectId("740b850f0406011059002b14"),product_id:10,product_state:"available",old_state:null,}]
Query
db.collection.update({product_id:10,},{"$set":{"old_state":"$product_state"}})
Result