title: Doctrine 2 QueryBuilder add multiple select elements /parameters?
body: <p>I am still struggling with doctrine QueryBuilder as I think it is not working properly when I want to add another element into a select expression . </p>
  
  <p>In this both situations doctrine $queryBuilder->getQuery()->getResults() is returning an array where entities are represented as a string instead of objects :</p>
  
  <p>Situation 1 :</p>
  
  <pre><code>$queryBuilder = $this-&gt;em-&gt;createQueryBuilder();
  $queryBuilder-&gt;select("e, 99 as number");
  </code></pre>
  
  <p>it returns </p>
  
  <pre><code>array(4) {
    [0]=&gt;
       array(2) {
          [0]=&gt; string(30) "Profile_Entity" //notice this is a string but it should be  an object instance 
          ["number"]=&gt; string(2) "99"
       }
    ...
  ...
  </code></pre>
  
  <p>if i will write</p>
  
  <pre><code>$queryBuilder = $this-&gt;em-&gt;createQueryBuilder();
  $queryBuilder-&gt;select("e");
  $queryBuilder-&gt;select("99 as number");
  </code></pre>
  
  <p>It will return the same things as situation 1</p>
  
  <p>Below is how it should normally be ( here is just one element in select expression  )</p>
  
  <pre><code>array(4) {
    [0]=&gt; object(stdClass)#935 (39) {
      ["__CLASS__"]=&gt; string(30) "Profile_Entity"
      ["id"]=&gt; int(46)
      ["headline"]=&gt; string(7) "asdasd
      ...
    ...
  ...
  </code></pre>