Skip to content

Fix issues #6356 on master - #7170

Merged
sushantdhiman merged 4 commits into
sequelize:masterfrom
witem:master
Feb 3, 2017
Merged

sushantdhiman merged 4 commits into
sequelize:masterfrom
witem:master

Conversation

@witem

@witem witem commented Jan 31, 2017 •

Copy link
Copy Markdown
Contributor

Pull Request check-list

Closes: #6356
Backport: #7164

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does your issue contain a link to 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)?
  • Have you added an entry under Future in the changelog?

Description of change

Fix ER_EMPTY_QUERY reject on update only virtual fields and add test. For master branch

@codecov-io

codecov-io commented Jan 31, 2017 •

Copy link
Copy Markdown

Codecov Report

Merging #7170 into master will increase coverage by <.01%.


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 d4f742a...6426236. Read the comment docs.

@witem witem mentioned this pull request Jan 31, 2017
3 of 5 tasks
@witem

witem commented Jan 31, 2017

Copy link
Copy Markdown
Contributor Author

Strange error in CI build:

Error: ENOENT: no such file or directory, rename 'coverage/lcov.info' -> 'coverage/integration.info'
    at Error (native)
    at Object.fs.renameSync (fs.js:681:18)
    at [eval]:1:15
    at Object.exports.runInThisContext (vm.js:54:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:409:26)
    at node.js:595:27
    at nextTickCallbackWith0Args (node.js:436:9)
    at process._tickCallback (node.js:365:13)

I think it is not relevant to my changes

Comment thread lib/model.js Outdated
});
}).then(() => {
if (!options.fields.length) return this;
const withoutVirtualFields = options.fields.filter((field) => !this.constructor._isVirtualAttribute(field));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

withoutVirtualFields => realFields

Comment thread lib/model.js Outdated
}).then(() => {
if (!options.fields.length) return this;
const withoutVirtualFields = options.fields.filter((field) => !this.constructor._isVirtualAttribute(field));
if (!options.fields.length || !withoutVirtualFields.length) return this;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just withoutVirtualFields.length check should be sufficient

@witem

witem commented Feb 2, 2017

Copy link
Copy Markdown
Contributor Author

changed

@sushantdhiman
sushantdhiman merged commit 118b4e9 into sequelize:master Feb 3, 2017
@christianbundy christianbundy mentioned this pull request Mar 14, 2017
2 of 3 tasks
mkaufmaner pushed a commit to mkaufmaner/sequelize that referenced this pull request Apr 25, 2017
* fix ER_EMPTY_QUERY error on update with virtual fields for master

* fix review

* [ci skip] Changelog for sequelize#6356
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.

3 participants