tattersoftware / codeigniter4-relations

Entity relationships for CodeIgniter 4
MIT License
87 stars 20 forks source link

Relation same table twice or more #29

Closed awasspl closed 2 years ago

awasspl commented 2 years ago

Hi guys,

Don't know if it's and issue or i make something wrong but with more than one relation with same table it's always return "last" FOREIGN KEY relation, ordering by key name.

Can You point me for a solution to get both relation listed in object?

example Invitation witch guest and inviting person both link with user table.

MGatner commented 2 years ago

You will probably need to create a schema for that manually, because (as you noted) it will only detect one relationship between the same two tables. Further discussion should happen in the Schemas repo since it is not really an issue with Relations.