Repository navigation
V3 Fix sourceKey for hasMany, issue: #4258 - #6652
Conversation
added a source key field to allow the source table to have a custom foreign key that is not primary, defaults to the primary if not given
Current coverage is 93.85% (diff: 100%)
|
|
Any chance it got accepted? |
|
It's still labeled as WIP? Also, tests are failing. Could you link the PR this is a backport for? |
|
@felixfbecker tests passed this time |
|
@Paxa Please link or create the PR which add this fix to |
|
I may be misusing this PR. Should this work when using an It still seems to be querying on the primary key in this case. (it's possible my syntax is off above, but that is essentially what's happening in the end). The key they join on between my models is the same on both models. If I change it to a different |
|
Can anybody help me with this please? |
|
Is there a PR to master? Need that first before you can do a backport |
|
I have ported the changes over to |
|
So, am I misreading this or is this basically ready to go into V3 except for a merge conflict in changelog.md? |
|
You are correct, thanks for bringing it up @LoneWolfPR :) Published in |
|
Thank you |
|
A million times thank you! This has made my life so much easier! |
Thanks for wanting to fix something on Sequelize - we already love you long time! Please delete this text and fill in the template below. If unsure about something, just do as best as you're able.
If your PR only contains changes to documentation, you may skip the template below.
Pull Request check-list
Please make sure to review and check all of these items:
npm run testornpm run test-DIALECTpass with this change (including linting)?Futurein the changelog?NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
Description of change
Please provide a description of the change here.
Closes #4258