title: Adding virtual columns to current table in Doctrine?
body: <p>I'm using Doctrine 1.2 with Symfony 1.4.  Let's say I have a User model, which has one Profile.  These are defined as:</p>
  
  <p>User:</p>
  
  <ul>
  <li>id</li>
  <li>username</li>
  <li>password</li>
  <li>created_at</li>
  <li>updated_at</li>
  </ul>
  
  <p>Profile:</p>
  
  <ul>
  <li>id</li>
  <li>user_id</li>
  <li>first_name</li>
  <li>last_name</li>
  <li>address</li>
  <li>city</li>
  <li>postal_code</li>
  </ul>
  
  <p>I would normally get data like this:</p>
  
  <pre><code>$query = Doctrine_Query::create()
      -&gt;select('u.id, u.username, p.first_name, p.last_name')
      -&gt;from('User u')
      -&gt;leftJoin('Profile p')
      -&gt;where('u.username = ?', $username);
  $result = $query-&gt;fetchOne(array(), Doctrine_Core::HYDRATE_ARRAY);
  print_r($result);
  </code></pre>
  
  <p>This would output something like the following:</p>
  
  <pre><code>Array (
      "User" =&gt; Array (
          "id" =&gt; 1,
          "username" =&gt; "jschmoe"
      ),
      "Profile" =&gt; Array (
          "first_name" =&gt; "Joseph",
          "last_name" =&gt; "Schmoe"
      )
  )
  </code></pre>
  
  <p>However, I would like for user to include "virtual" columns (not sure if this is the right term) such that fields from Profile actually look like they're a part of User.  In other words, I'd <em>like</em> to see the print_r statement look more like:</p>
  
  <pre><code>Array (
      "User" =&gt; Array (
          "id" =&gt; 1,
          "username" =&gt; "jschmoe",
          "first_name" =&gt; "Joseph",
          "last_name" =&gt; "Schmoe"
      )
  )
  </code></pre>
  
  <p>Is there a way to do this either via my schema.yml file or via my Doctrine_Query object?</p>