-
-
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
throw error after all saves are done #13621
Conversation
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.
Couple of minor issues but LGTM overall
test/model.create.test.js
Outdated
|
||
const Count = db.model('gh4628', countSchema); | ||
|
||
testSchema.pre('save', async function(next) { |
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.
Why is this pre hook here? Doesn't seem to be necessary. Are you just looking for a way to leave some saves in progress to test?
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.
I just copied the above test and modified it slightly. I see now that for this test that part is not necessary.
dosnt #13544 already (somewhat) address this? because enabling |
@hasezoey #13544 addresses a similar issue, but this change applies to cases where |
closes #4628