Skip to content
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

Topic Request: Relations with STI #184

Open
vercotux opened this issue Dec 2, 2017 · 0 comments
Open

Topic Request: Relations with STI #184

vercotux opened this issue Dec 2, 2017 · 0 comments
Labels

Comments

@vercotux
Copy link

vercotux commented Dec 2, 2017

Hi Samdark,

I was reading through the cookbook's Single Table Inheritance article and found it very useful, but I noticed it's missing one key part: dealing with relations.

It would be great if you could add an explanation on how to declare relations from a regular AR to a STI AR and vice versa. For example, in the article there is a Car AR. Could we add for example a hypothetical AR called Vendor which has a getCars() (and maybe getSportCars(), getHeavyCars()) relation(s) pointing to Car? And then a hasOne getVendor() relation in Car pointing back to Vendor. Maybe briefly touch on how inverseOf would work in that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants