title: cakephp model: field vs. set method
body: <p>In my code, I'm setting fields of my model with some set calls, e.g.</p>
  
  <pre><code>$model-&gt;set('field','value');
  </code></pre>
  
  <p>If I understood correctly, this sets the field values in the <code>$model-&gt;data</code> array.
  Immediately after (i.e. same request, but different parts of the code), I would like to access those fields to process them further. I thought this would be possible with:</p>
  
  <pre><code>$value = $model-&gt;field('field');
  </code></pre>
  
  <p>But that doesn't work, because (as I found out by looking at the code) <code>field()</code> is querying the table, but does not use the <code>$model-&gt;data</code> array. Now my question(s):</p>
  
  <ol>
  <li>What would be the "correct" way to read field values again from a model that were just set by <code>$model-&gt;set(...)</code> but not yet saved to the table? Access <code>$model-&gt;data</code> directly?</li>
  <li>Is it necessary to call <code>$model-&gt;save()</code> first to be able to access field values again?</li>
  <li>I feel it would be consistent to have a method to set and retrieve field values symmetrically without the need to save in between. Does cakephp feel the same? ;)</li>
  </ol>