Skip to content

Bugfix: Return value in MSSQL soft-delete - #6930

Merged
sushantdhiman merged 1 commit into
sequelize:masterfrom
lumaxis:bugfix/master-mssql-soft-delete-return
Nov 30, 2016
Merged

sushantdhiman merged 1 commit into
sequelize:masterfrom
lumaxis:bugfix/master-mssql-soft-delete-return

Conversation

@lumaxis

@lumaxis lumaxis commented Nov 30, 2016

Copy link
Copy Markdown
Contributor

This is a version of #6916, ported against master.

Pull Request check-list

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

  • Does npm run test or npm run test-mssql 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

This fixes an issue where undefined was returned when using a soft-delete on MSSQL because the query type of the UPDATE query that ran the soft-delete was not properly set.

@mention-bot

Copy link
Copy Markdown

@lumaxis, thanks for your PR! By analyzing the history of the files in this pull request, we identified @sushantdhiman, @felixfbecker and @mickhansen to be potential reviewers.

@lumaxis
lumaxis force-pushed the bugfix/master-mssql-soft-delete-return branch from 476b238 to 6313217 Compare November 30, 2016 00:08
@codecov-io

codecov-io commented Nov 30, 2016 •

Copy link
Copy Markdown

Current coverage is 94.65% (diff: 100%)

No coverage report found for master at f191bd3.

Powered by Codecov. Last update f191bd3...6313217

Comment thread changelog.md Outdated
- [FIXED] Issue with overrriding custom methods with association mixins (all association methods are now exposed) [#6682](https://github.com/sequelize/sequelize/issues/6682)
- [ADDED] Support condition objects in utility functions [#6685](https://github.com/sequelize/sequelize/pull/6685)
- [FIXED] HSTORE and JSON fields being renamed when `options.field` is specified on a matching model attribute
- [FIXED] Soft-delete not returning number of affected rows on mssql [#6916](https://github.com/sequelize/sequelize/pull/6930)

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.

Link and issue id doesn't match ^

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Fixed, thanks!

Because the query type was not properly set when doing a soft delete, Sequelize tried to format the result in the wrong format.
@lumaxis
lumaxis force-pushed the bugfix/master-mssql-soft-delete-return branch from 6313217 to 4d819e2 Compare November 30, 2016 17:21
@sushantdhiman
sushantdhiman merged commit 673cf64 into sequelize:master Nov 30, 2016
@lumaxis
lumaxis deleted the bugfix/master-mssql-soft-delete-return branch November 30, 2016 20:20
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.

5 participants