Open suityou01 opened 4 months ago
Hi,
Had the same issue today, I do not know if this package support relationships with composite keys but if it does I missed it Altho in the meantime I was able to work around it with another package that do specifically relationships with composite keys : https://github.com/tylernathanreed/laravel-composite-relations
'Hope this helps
I will be testing some solution based on extending BelongsTo and the other types of relationship to solve it.
I have successfully installed the package and created a model and factory with a composite key.
However when I create a model that has a "BelongsTo" relationship I get an error such that
Line 97 in BelongsTo.php is linkked to here for your convenience.
Also the model definitions are as follows :
Belongs to from the child model is defined as
The parent mode is defined as
class ParentModel extends Model { use HasFactory; use HasCompositeKey;