title: Can I iterate over an Entity's properties in Doctrine2?
body: <p>i use </p>
  
  <pre><code>$myblogrepo = $this-&gt;_doctrine-&gt;getRepository('Entities\Blog')-&gt;findBy(array('id' =&gt; 12);
  </code></pre>
  
  <p>i access via </p>
  
  <pre><code>foreach($myblogrepo as $key =&gt;$value){
  
  echo $key . $value;
  
  }
  </code></pre>
  
  <p>how can i get the field names? i thought the key =>  would work but it print s the key as 0</p>
  
  <p>so i thought this would work:</p>
  
  <pre><code>foreach($myblogrepo[0] as $key =&gt;$value){
  
  echo $key . $value;
  }
  </code></pre>
  
  <p>but still nothing..
  }</p>