-
Type: Task
-
Resolution: Incomplete
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:
-
Environment:linux and window . it just a suggestion
*Location*: http://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/
*User-Agent*: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
*Referrer*: http://www.google.com.hk/url?sa=t&rct=j&q=mongodb+findAndModify+is+insert+or+update&source=web&cd=1&ved=0CCoQFjAA&url=%68%74%74%70%3a%2f%2f%64%6f%63%73%2e%6d%6f%6e%67%6f%64%62%2e%6f%72%67%2f%6d%61%6e%75%61%6c%2f%72%65%66%65%72%65%6e%63%65%2f%6d%65%74%68%6f%64%2f%64%62%2e%63%6f%6c%6c%65%63%74%69%6f%6e%2e%66%69%6e%64%41%6e%64%4d%6f%64%69%66%79&ei=9rXnUr7AFPGziQf_m4HQCA&usg=AFQjCNFPPbUgNP-CSn-whwmqlAFl-RtaBw
*Screen Resolution*: 1920 x 1080
*repo*: docs
*source*: reference/method/db.collection.findAndModify
linux and window . it just a suggestion *Location*: http://docs.mongodb.org/manual/reference/method/db.collection.findAndModify/ *User-Agent*: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 *Referrer*: http://www.google.com.hk/url?sa=t&rct=j&q=mongodb+findAndModify+is+insert+or+update&source=web&cd=1&ved=0CCoQFjAA&url=%68%74%74%70%3a%2f%2f%64%6f%63%73%2e%6d%6f%6e%67%6f%64%62%2e%6f%72%67%2f%6d%61%6e%75%61%6c%2f%72%65%66%65%72%65%6e%63%65%2f%6d%65%74%68%6f%64%2f%64%62%2e%63%6f%6c%6c%65%63%74%69%6f%6e%2e%66%69%6e%64%41%6e%64%4d%6f%64%69%66%79&ei=9rXnUr7AFPGziQf_m4HQCA&usg=AFQjCNFPPbUgNP-CSn-whwmqlAFl-RtaBw *Screen Resolution*: 1920 x 1080 *repo*: docs *source*: reference/method/db.collection.findAndModify
and i think add a flag let we know findAndModify (when upset set true)operator is inserted a data or updated a data is very necessary.
maybe use update method set options upsert =true .i can know inserted or
updated ,but update(upset=true) method i can't get insert data _id