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

3 participants
@miroslavLalev
Copy link
Contributor

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 miroslavLalev force-pushed the miroslavLalev:fix-update branch from 1696483 to 4254848 Jan 21, 2019

@miroslavLalev

This comment has been minimized.

Copy link
Contributor Author

miroslavLalev commented Jan 22, 2019

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

This comment has been minimized.

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

4 checks passed

codecov/patch 100% of diff hit (target 96.3%)
Details
codecov/project 96.3% (+0%) compared to 6c9b993
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@sushantdhiman

This comment has been minimized.

Copy link
Member

sushantdhiman commented Jan 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.