Skip to content
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(model/update): propagate paranoid to individualHooks query #10369

Merged
merged 1 commit into from Jan 23, 2019

Conversation

miroslavLalev
Copy link
Contributor

@miroslavLalev miroslavLalev commented Jan 21, 2019

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

I was testing some scenarios and noticed that when:

  1. Have a model with paranoid: true set
  2. Have beforeUpdate hook defined in the model
  3. Use the static <Model>.update method with individualHooks: true

The hook does not get called and therefore update statement is not executed. After a bit of investigation, I found the root cause - the paranoid option was not propagated to the select statement.

As it was quite straightforward change, I decided to give it a go and created PR directly :)

@miroslavLalev
Copy link
Contributor Author

It seems that the AppVeyor CI test failed with something sporadic as I couldn't reproduce it. Is there any way of retriggering it?

@codecov
Copy link

codecov bot commented Jan 23, 2019

Codecov Report

Merging #10369 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10369   +/-   ##
=======================================
  Coverage    96.3%    96.3%           
=======================================
  Files          92       92           
  Lines        9813     9813           
=======================================
  Hits         9450     9450           
  Misses        363      363
Impacted Files Coverage Δ
lib/model.js 96.77% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c9b993...4254848. Read the comment docs.

@sushantdhiman sushantdhiman merged commit 100b2dd into sequelize:master Jan 23, 2019
@sushantdhiman
Copy link
Contributor

Thanks @miroslavLalev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants