-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
findOneAndModify
deprecation still showing in logs
#7865
Comments
Not sure if it's related but note that your ! if (isPro) {
dbOptions = {
useNewUrlParser: true,
secondaryAcceptableLatencyMS: 15,
poolSize: defaultPoolSize,
socketTimeoutMS: 90000 // Mitigation of #1548
+ useFindAndModify: false
}
! } else {
dbOptions = {
useNewUrlParser: true,
poolSize: defaultPoolSize,
reconnectTries: 30,
reconnectInterval: 1000,
useFindAndModify: false // #1516
}
!} |
🤦♂️ That's most likely it... will upload and close on success. I must have had a really bad day that day to miss that conditional. |
A few bad days I guess... sorry for the issue and thank you for the helpful assistance. I'm going to go hide for a while. LOL. 😸 |
Thanks for finding this @Fonger 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
Possibly a bug.
What is the current behavior?
Still shows deprecation in logs:
2019-06-04 03:06:37.492 +00:00: (node:2962) DeprecationWarning: Mongoose: `findOneAndUpdate()` and `findOneAndDelete()` without the `useFindAndModify` option set to false are deprecated. See: https://mongoosejs.com/docs/deprecations.html#-findandmodify-
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Perhaps we shouldn't be seeing the deprecation warning anymore based off the inverse of this sentence. e.g. Since we changed to
useFindAndModify: false
should we not be seeing this deprecation notice anymore?I realize we can, and have been, ignore the deprecation warning but I thought it was squashed yet it still shows up. We could also just split out the usage since it's used exactly, and only, in one place in our source... however any assistance/investigation would be appreciated.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
MongoDB 4.0.9 & 4.0.10 via mongodb@3.2.6 and mongoose@5.5.11 / mongoose@5.5.12
The text was updated successfully, but these errors were encountered: