how to ignore duplicate documents when using insertMany in mongodb php library? how to ignore duplicate documents when using insertMany in mongodb php library? mongodb mongodb

how to ignore duplicate documents when using insertMany in mongodb php library?


Try to replace 'continueOnError' option by 'ordered' set to false, based on the documentation, when ordered option is set to false the insertMany will continue writing, even if a single write fails.

here is the docs link: insertMany