I have this table structure:
| users | --- has many > --- | preferences_users | --- < has many --- | preferences |
A preference could be something like "first name" or "surname" but the value for these preferences are stored in the joining table.
I am using Codeigniter and Datamapper ORM to get relational tables into objects, however I am not sure how to get this value in the joining table.
I am doing this:
$user = new User();
$user->where('unique_url', $url)->get();
$user->preferences->get_iterated();
My relationships are set up so that they both have $has_many = array('tablename');
and I am able to get the values from each table.
HOwever I want to be able to get a table column value from the joining table, does anyone know how to do this?
Thanks,
Ian