-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add support for composite keys #1479
Conversation
1ed7388
to
5075731
Compare
@mfn, would it be possible to review this PR please? Thanks! |
Can we have a test for this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some tests?
5075731
to
69b6eb7
Compare
Do we need that package to test it? Or can we replicate a simple case here? |
I'm working on a test at the moment, I don't think we need the package |
Test has been added |
Thanks! |
Thank you!! |
* Add support for composite keys * chore: add composite foreign key test
Fixes #1474, topclaudy/compoships#77
Summary
Hello!
This PR adds support for relationships with composite keys. There have been a couple of issues over the years about this but this still has not been resolved (I don't want to have to extend the Artisan command in my app):
There's even an open issue on the Compoship side of things (topclaudy/compoships#77) but as the maintainer stated, there really nothing to do on that end.
I understand Laravel does not support composite keys, however, people do use them and this package already provides the ability to define non-Laravel relations so it would be much easier to support this rather than to expect everyone who uses composite keys to have to extend the Artisan command with the same custom logic.
Thanks!
Type of change
Checklist
composer fix-style