title: CakePHP 3.x -> belongs to Many for theree tables
body: <p>I have a setup where the relationship is three factors:</p>
  
  <p>member
  group
  role</p>
  
  <p>So a member may be part of multiple groups (and groups contain multiple members), but depending on that combination, the role will also differ.</p>
  
  <p>A database person at work told me to set up the tables like this:</p>
  
  <pre><code>member
  id name
  
  group
  id name
  
  role
  id name
  
  member_group_role
  id member_id group_id role_id
  </code></pre>
  
  <p>How do I get this to work with cakephp?  I have successfully set up HABTM for only two linked tables but not three.</p>
  
  <p>Thanks!</p>