title: Want to save data field from form into two columns of two models
body: <p>I have a Profile model with a hasOne relationship to a Detail model. I have a registration form that saves data into both model's tables, but I want the <code>username</code> field from the profile model to be copied over to the<br>
  <code>username</code>field in the details model so that each has the same <code>username</code>.</p>
  
  <pre><code>function new_account()
  {
      if(!empty($this-&gt;data))
      {
          $this-&gt;Profile-&gt;modified = date("Y-m-d H:i:s");                 
          if($this-&gt;Profile-&gt;save($this-&gt;data))
          {
              $this-&gt;data['Detail']['profile_id'] = $this-&gt;Profile-&gt;id;
              $this-&gt;data['Detail']['username'] = $this-&gt;Profile-&gt;username;
  
          $this-&gt;Profile-&gt;Detail-&gt;save($this-&gt;data);
          $this-&gt;Session-&gt;setFlash('Your registration was successful.');
  
                      $this-&gt;redirect(array('action'=&gt;'index'));
          }
      }
  
  }
  </code></pre>
  
  <p>This code in my Profile controller gives me the error:</p>
  
  <pre><code>Undefined property: Profile::$username
  </code></pre>
  
  <p>Any ideas?</p>