mangodb save and insert the difference

Save :
_id successful insertion parameter is not specified, _id generated automatically
designated _id _id but there is no record corresponding to successful insertion _id same
specified _id _id corresponding record exists but according _id, updating records

INSERT :
_id successful insertion parameter is not specified, _id generated automatically
designated _id _id but there is no record corresponding to successful insertion _id same
specified _id but there are corresponding records _id insert failed, an error (E11000 duplicate key error )

Guess you like

Origin www.cnblogs.com/thaipine/p/12071606.html