Closed aakarim closed 2 years ago
I'll look into it.
@staudenmeir I know this is old, but I came across the same issue. I also use the Compoships package and tried it with yours but it did not work.
I hope you find the time to implement something like this.
Thanks for a great package.
I released v1.16
(Laravel 9) with support for composite keys.
If you concatenate existing relationships with hasManyDeepFromRelations()
, you can now include compoships
relationships:
https://github.com/staudenmeir/eloquent-has-many-deep#third-party-packages
If you define relationships manually with hasManyDeep()
, you can now use the CompositeKey
class:
https://github.com/staudenmeir/eloquent-has-many-deep#composite-keys
@staudenmeir Great news! Thank you for this, it will surely come in handy in my current project.
Hi, very useful package, thank you.
I am trying to use a hasManyDeep with multiple keys. This means that there are two (or more) keys on the foreign table that I want to match to.
SpecialPersonList -> SpecialPerson -> Profile -> User
I want to get all the Users in this SpecialPersonList.
However, the SpecialPerson->Profile relationship is a hasMany relationship with multiple keys either
fb_id
ortwitter_id
. If I want to go from SpecialPerson->Profile I can use this package https://github.com/topclaudy/compoships which allows me to get there. Unfortunately, I can't use hasManyDeep with this package (it doesn't support the multiple keys relation). Are there any changes I/we can make to support either a) multiple keys or b) the Compoships package?