views:

18

answers:

0

Let's say we have a User Model that has many Posts.

The Posts Model has many Categories

The Posts Model also has many Comments.

How do we find dynamically, the relationships that the User Model has?

The idea is to make an admin backend to a site, where I can have one function, that when passed a model, can retrieve all data related to that Object, and show it based on the found data's relationship.

I'm guessing I need to access the Model Itself, and not an instance.

Any help would be appreciated, thank you.