title: DataMapper ORM relationships
body: <pre><code>table1(users)
  |ID|name  |type  |
  |1 |demo  |admin |
  |2 |demoX |client|
  
  table2(visits)
  |ID|admin_id|visitor_id|visit_date|...
  |1 |1       |2         |2013-01-01|...
  admin(fk)-&gt;users(id)
  user(fk)-&gt;users(id)
  </code></pre>
  
  <p>simple scheduler project, it contain 2 tables.</p>
  
  <p>1st (users) contain all users, 2nd table contain all bookings(visits).</p>
  
  <p>to get all bookings of an admin i run  <code>Select * from visits where admin_id=$id;</code>, and join
  visitor info from users table.</p>
  
  <p>........
  so basically,</p>
  
  <p>every admin can have many <strong>visit</strong></p>
  
  <p><strong>visit</strong> must contain (ONE)admin and (ONE)visitor.</p>
  
  <p>how can i setup this kind of relation in datamapper orm ?</p>