title: Ardent + Laravel, auto hydrate relation
body: <p>I use lavarel with ardent package.</p>
  
  <p>I have some problem when i want to update a row.</p>
  
  <p>I have 2 model Client and Address related by morphone relation.</p>
  
  <p>This relation work well, when i want to get a client this line return expected result :</p>
  
  <pre><code>Client::with('address')-&gt;find($id);
  </code></pre>
  
  <p>But i can't understand how to update a client with a clean solution. Somebody can answer to these questions :</p>
  
  <ol>
  <li>With Ardent how could you autoHydrate related model ?</li>
  <li>When you update some data, what is the best practice in lavarel ? Use update methdod ? Use save ? Use push ? Fill all model ? Use auto hydrate ?</li>
  </ol>
  
  <p>When i log Input::all() in my update method i get that :</p>
  
  <pre><code>[2014-05-31 15:52:56] production.INFO: {"id":983,"firstName":"Susanne","lastName":"Adam","birthDate":"18\/06\/1982","inscriptionDate":"08\/09\/2013","status":3,"created_at":"2014-05-31 14:26:25","updated_at":"2014-05-31 14:26:25","email":"bernard.alix@free.fr","address":{"id":983,"address":"avenue Etienne","address2":"","ville":"Cordierboeuf","cp":"25 10","phone":"0403983157","mobile":"+33 (0)3 0","addressable_id":983,"addressable_type":"Client","created_at":"2014-05-31 14:27:58","updated_at":"2014-05-31 14:27:58"}} [] []
  </code></pre>
  
  <p>As you see address data are inside client data. </p>
  
  <p>3.When I use update, save or push (eloquent's method) eloquent does not understand that he should update Address model then update related Client model. My data's format isn't well formed ?</p>
  
  <p>Thanks.</p>
  
  <p><strong>UPDATE :</strong></p>
  
  <p>When i do Log::info(Input::all()), i get the following json data in my controller :</p>
  
  <pre><code>[2014-06-01 18:10:46] production.INFO: {"id":284,"firstName":"Andr\u00e9e","lastName":"Adam","birthDate":"23\/07\/1944","inscriptionDate":"22\/11\/2013","status":2,"created_at":"2014-06-01 15:41:22","updated_at":"2014-06-01 18:06:44","email":"monique17@normand.com","address":{"id":284,"streetAddress":"93, avenue Lefort","streetAddress2":"","city":"Boulay-sur-Leger","zipCode":"14054","phone":"09 51 03 1","mobile":"+33 6 00 6","addressable_id":284,"addressable_type":"Client","created_at":"2014-06-01 15:42:50","updated_at":"2014-06-01 18:06:44"}} [] []
  </code></pre>
  
  <p>With ardent's autohydratation that doesn't work... Client autohydrate successfully but Address does not, maybe due to the polymorphic relation (one-to-one) between them.</p>
  
  <p>I try to fill my models this way :</p>
  
  <pre><code>$client = Client::with('address')-&gt;find($id);
  $client-&gt;update(Input::except('address'));
  $client-&gt;address-&gt;update(Input::only('address'));
  </code></pre>
  
  <p>but this doesn't work because Input::only('address') gives wrong formed data, when i log this i get that :</p>
  
  <pre><code>Log::info(Input::except('address'));
  Log::info(Input::only('address'));
  
  //output 
  
  [2014-06-01 18:20:34] production.INFO: {"id":284,"firstName":"Andr\u00e9e","lastName":"Adam","birthDate":"23\/07\/1944","inscriptionDate":"22\/11\/2013","status":2,"created_at":"2014-06-01 15:41:22","updated_at":"2014-06-01 18:10:46","email":"monique17@normand.com"} [] []
  [2014-06-01 18:20:34] production.INFO: {"address":{"id":284,"streetAddress":"93, avenue Lefort","streetAddress2":"","city":"Boulay-sur-Leger","zipCode":"14054","phone":"09 51 03 1","mobile":"+33 6 00 6","addressable_id":284,"addressable_type":"Client","created_at":"2014-06-01 15:42:50","updated_at":"2014-06-01 18:06:44"}} [] []
  </code></pre>
  
  <p>So i mix two methods :</p>
  
  <pre><code>$inputs = Input::except('_method');
  $client = Client::with('address')-&gt;find($id);
  
  $client-&gt;update(Input::except('address'));
  $client-&gt;address-&gt;update($inputs['address']);
  </code></pre>
  
  <p>This work pretty well !</p>
  
  <p>But i can't understand why ardent's autohydration fails...</p>
  
  <p>Thanks.</p>