Topic: Active Record and STI

I have an app under development and am implementing single table inheritance for my Users table due to the fact that there is a heirarchy of users and STI making a few aspects of the devlopment so much easier.

My question is: Am I still able to use the Active Record functionality for joined tables? In the case of my app I need to be able to pull all the child users tied to the parent user, but being in the same table with a different "type" attribute, can I still use the parent.child.attribute notation?

Thanks in advance.

Re: Active Record and STI

Yes you can, you just have to define the associations in a subclass.  In one project I have a "person" object that employee and customer subclass from.  I also have organization where shop and business subclass from, and a show has_many employees and a business has_many customers.

Re: Active Record and STI

Thanks for the response, I was hoping this was true.