[eluser]MeanStudios[/eluser]
[quote author="OverZealous.com" date="1246525010"]You got it! I didn't have a chance to respond earlier, but that's exactly how I would have done it.
I don't know how often you are editing / looking up these relationships, but this might end up being query-intensive. Luckily you can use include_related to get items from the 'tree' 2 at a time.
Good Luck![/quote]
Yay - I got it right haha.
Now for another question (don't shoot me heh). How do I access those or save data to them?
Code:
$r = new Role();
$r->where('id', '2')->get();
//Then to get the child roles or parent role of '2' I just do?
$child_roles = $r->child_role->get(); //<-- Could be 0 or more rows.
$parent_role = $r->child_role->get(); //<-- Should only be 0 or 1 row.
I'm not sure about the saving though . How would I make a role of child of another?