title: Cake PHP automagic forms and multiple tables
body: <p>I have a form with the following fields:</p>
  
  <ul>
  <li>firstName</li>
  <li>lastName </li>
  <li>emailAddress</li>
  </ul>
  
  <p>followed by (up to) ten name/email fields, like so</p>
  
  <ul>
  <li>friendName-1</li>
  <li>friendEmail-1</li>
  <li>friendName-2</li>
  <li>friendEmail-2
  ...
  etc.</li>
  </ul>
  
  <p>The firstName, lastName &amp; emailAddress fields will be saved into a 'referrals' table, but 10 name/email pairs will go into a 'friends' table, containing a foreign key refferal_id.</p>
  
  <p>Normally I use the cakephp 'automagic' forms, and set up my validation in the model, and do a <code>$this-&gt;model-&gt;save();</code> If it fails I fall back on my model validation rules and the error messages get spat back into my form html. No problems.</p>
  
  <p>How would I do this for TWO tables though? I'm thinking that the automagic stuff is not the way to go, but I feel I will lose a lot without it, such as validation in my models and custom error messages.</p>
  
  <p>Is there a happy medium? I'm fairly new to cake so I'm wondering if theres a way to use automagic with multiple tables.</p>