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
fix(base): allow global option mongoose.set('strictQuery', true); #9016
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1b190b6
fix(documentarray): make sure you can call `unshift()` after `map()`
philippejer 2fd29b0
docs: add anchor tag to strictQuery
AbdelrahmanHafez 5da9f44
test: repro #6658 strictQuery
AbdelrahmanHafez f7f9b4f
fix(base): allow setting strictQuery globally
AbdelrahmanHafez 80d40e5
fix test causing other tests to fail
AbdelrahmanHafez 93b3ed6
test: refactor tests re #6658, use beforeEach
AbdelrahmanHafez 3c46473
docs(guide): add anchor tag to strict option
AbdelrahmanHafez e736a73
test(model): repro #8938
vkarpov15 faaff44
fix(model): ensure consistent `writeErrors` property on insertMany er…
vkarpov15 b5c5211
fix(model): report `insertedDocs` on `insertMany()` errors
vkarpov15 ed97aac
Merge pull request #9014 from AbdelrahmanHafez/strictQuery-anchor
vkarpov15 14bba6f
Merge pull request #9013 from philippejer/gh-9012
vkarpov15 625a925
Merge branch 'master' into gh-6658
vkarpov15 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vkarpov15 I'd like to know what you think of this approach.
I initially made the cleanup in each test, but if one of those tests had failed, the cleanup wouldn't have happened, causing more tests to fail, making it difficult to find the root cause of all the failing tests.
I think this mitigates this concern, but I still don't like it. How would you do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach is ok, but the better approach would be to create a new Mongoose instance using
const _mongoose = new mongoose.Mongoose();
and use_mongoose.set()
. Check out the test for #6578 for an example.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this attempt to create a new connection with the same URI for the database? Making tests run significantly slower?