Q:

Which option should be used with findAndModify() command to return the modified document instead of the pre-modification document?

0

Which option should be used with findAndModify() command to return the modified document instead of the pre-modification document?


  1. findAndModify by default returns the pre-modification document
  2. Set {new : true}
  3. Use the POST version of findAndModify called findAndModifyPost
  4. Both b and c are valid

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Correct Answer:

B.Set {new : true}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

MongoDB MCQ Quiz (Multiple Choice Questions And Answers)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Which of the following collections are used by Mon... >>
<< Consider that the posts collection contains an arr...