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: fixes gets on many-to-many with non-primary target key #11587 #11778

Merged

Conversation

aheuermann
Copy link
Contributor

@aheuermann aheuermann commented Dec 31, 2019

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 update the typescript typings accordingly (if applicable)?
  • Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

Closes #11587
When using a belongsToMany using a non-primary key as the targetKey it is ignored and either no results are returned (if the columns on the join table are of the same type as the pk) or fails if different types.

@codecov
Copy link

codecov bot commented Dec 31, 2019

Codecov Report

Merging #11778 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11778   +/-   ##
=======================================
  Coverage   96.26%   96.26%           
=======================================
  Files          94       94           
  Lines        9191     9191           
=======================================
  Hits         8848     8848           
  Misses        343      343

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 081ec72...b256a87. Read the comment docs.

@sushantdhiman sushantdhiman merged commit 12700ca into sequelize:master Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

instance.getThing() fails on many-to-many with non-primary target key
3 participants