title: Using DataMapper ORM and Codeigniter to select join table value in a many to many relationship
body: <p>I have this table structure:</p>
  
  <p>| users | --- has many > --- | preferences_users | --- &lt; has many --- | preferences |</p>
  
  <p>A preference could be something like "first name" or "surname" but the value for these preferences are stored in the joining table.</p>
  
  <p>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.</p>
  
  <p>I am doing this:</p>
  
  <pre><code>$user = new User();
  $user-&gt;where('unique_url', $url)-&gt;get();
  $user-&gt;preferences-&gt;get_iterated();
  </code></pre>
  
  <p>My relationships are set up so that they both have <code>$has_many = array('tablename');</code> and I am able to get the values from each table.</p>
  
  <p>HOwever I want to be able to get a table column value from the joining table, does anyone know how to do this?</p>
  
  <p>Thanks,</p>
  
  <p>Ian</p>