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): handle virtual attributes in includes #10785

Merged
merged 1 commit into from Apr 17, 2019

Conversation

danconnell
Copy link
Contributor

Pull Request check-list

Please make sure to review and check all of these items:

  • 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

Fix virtual attributes used in includes to be returned by get after the model is loaded #10552

originalAttributes wasn't being set before calling Utils.mapFinderOptions like it is in other places

@@ -699,7 +698,7 @@ class Model {

// Validate child includes
if (include.hasOwnProperty('include')) {
this._validateIncludedElements.call(include.model, include, tableNames, options);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just cleanup

@codecov
Copy link

codecov bot commented Apr 17, 2019

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10785   +/-   ##
=======================================
  Coverage   96.33%   96.33%           
=======================================
  Files          94       94           
  Lines        9006     9006           
=======================================
  Hits         8676     8676           
  Misses        330      330
Impacted Files Coverage Δ
lib/model.js 96.67% <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 93e64a9...32ceba7. Read the comment docs.

@sushantdhiman sushantdhiman merged commit 4cc7dc8 into sequelize:master Apr 17, 2019
@sushantdhiman
Copy link
Contributor

🎉 This PR is included in version 5.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants