title: Saving and reading three models in Cakephp
body: <p>I was working around join three models. I have Hospital, Doctor and Specialty. A <strong>Hospital</strong> hasAndBelongsToMany <strong>Doctor</strong> and a <strong>Doctor</strong> hasAndBelongsToMany <strong>Specialty</strong>. So 1 doctor could work in 1 Hospital with 1 specialty, but the same doctor could work in another hospital with another specialty.</p>
  
  <p>I need to create a table in the database joinning 3 models like this:</p>
  
  <p>table: doctors_hospitals_specialties
  fields:  id  |   doctor_id    |  hospital_id   |   specialty_id</p>
  
  <p>but it is not working for me. I have searched in a lot of forums the way to implement this but I couldn't find anything. Please help!</p>