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
Add deprecation warning for default strictQuery
#12666
Comments
@vkarpov15 @hasezoey |
i would guess under the following conditions: |
I think only on database connection. We're changing the default global option, so printing a warning if |
added deprecation warning for default `strictQuery`
import mongoose from "mongoose";
// ADD THIS IS YOUR CONNECTION FILE
mongoose.set('strictQuery', true);
// CONNECTION
mongoose.connect("mongodb://0.0.0.0:27017/<dbname>", {
useNewUrlParser: true,
useUnifiedTopology: true,
}).then(console.log("connected to db!"))
.catch(e => console.log(e)) |
Prerequisites
Issue
We're planning on switching
strictQuery
back tofalse
in Mongoose 7, see #11861. We should add a deprecation warning to encourage devs to addmongoose.set('strictQuery', false)
in their projects to prepare for this change.The text was updated successfully, but these errors were encountered: