var ones = db.Photo.find({'owner.$id':ObjectId("5344f0dab7c58e8e098b4567")})db.Photo.find({'owner.$id':ObjectId("5344f0dab7c58e8e098b4567")}).forEach(function(o){o.owner=null;db.Photo.save(o)});