-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add support for composite keys #1479
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
calebdw
force-pushed
the
composite_keys
branch
2 times, most recently
from
November 6, 2023 20:09
1ed7388
to
5075731
Compare
@mfn, would it be possible to review this PR please? Thanks! |
Can we have a test for this? |
barryvdh
requested changes
Feb 7, 2024
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?
calebdw
force-pushed
the
composite_keys
branch
from
February 7, 2024 21:42
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 |
barryvdh
approved these changes
Feb 8, 2024
Thanks! |
Thank you!! |
d3v2a
pushed a commit
to d3v2a/laravel-ide-helper
that referenced
this pull request
Feb 16, 2024
* Add support for composite keys * chore: add composite foreign key test
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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