title: Doctrine 2 - Hydratation from stored procedure
body: <p>I have little problem with stored procedure (pgsql).
  In the return of this procedure, the array return has special construction that unusable for me in this way. </p>
  
  <p>I try many different way to call the SP or Hydratation method but always same kind of return.</p>
  
  <p>Can you help me on this ?</p>
  
  <p>My specs : I want an array as return (just value needed), but the SP return an array of array with one line by result like this (var_dumped):</p>
  
  <pre><code>array (size=3)
    0 =&gt; 
      array (size=1)
        'get_structure_utilisateur' =&gt; int 2
    1 =&gt; 
      array (size=1)
        'get_structure_utilisateur' =&gt; int 1
    2 =&gt; 
      array (size=1)
        'get_structure_utilisateur' =&gt; int 10
  </code></pre>
  
  <p>I would like something like :</p>
  
  <pre><code>array (size=3)
      0 =&gt; 2
      1 =&gt; 1
      2 =&gt; 10
  </code></pre>
  
  <p>I try this or this, same result or little differences :</p>
  
  <pre><code>$query = $this-&gt;getEntityManager()
      -&gt;getConnection()
      -&gt;query('select admin.get_structure_utilisateur(3, 1)')
      -&gt;fetchAll();
  </code></pre>
  
  <p>or</p>
  
  <pre><code>$sql = "select admin.get_structure_utilisateur(:utilisateurId, :clientId)";
  $rsm = new ResultSetMapping;
  $rsm-&gt;addScalarResult('get_structure_utilisateur', 'structures');
  $query = $this-&gt;getEntityManager()-&gt;createNativeQuery($sql, $rsm)
      -&gt;setParameter('clientId', 1)
      -&gt;setParameter('utilisateurId', 3);
  $query-&gt;getResult(Query::HYDRATE_SCALAR);// I Try some other hydratation method
  </code></pre>
  
  <p>Thanks</p>