title: Symfony2 - Doctrine returns big unexcepted object
body: <p>I use Symfony2 and Doctrine in my project. I would like get some data from database. So I create simple code in my controller</p>
  
  <pre><code>$repository = $this-&gt;getDoctrine()
                  -&gt;getRepository('AppBundle:TransactionDefined');
  
  
  $defined = $repository-&gt;findOneBy(
      array(
        'description' =&gt; $transaction-&gt;getDescription(),
        'recipient' =&gt; $transaction-&gt;getRecipient(),
        'accountNumber' =&gt; $transaction-&gt;getAccountNumber(),
        'title' =&gt; $transaction-&gt;getClearTitle()
      )
  );
  </code></pre>
  
  <p>In my opinion I should get TransactionDefined object</p>
  
  <p>But I got big object with strange data. What is wrong in my code ?</p>
  
  <pre><code>object(AppBundle\Entity\TransactionDefined)#645 (6) {
  
  
  ["category":protected]=&gt;
    object(Proxies\__CG__\AppBundle\Entity\TransactionCategory)#656 (6) {
      ["__initializer__"]=&gt;
      object(Closure)#648 (3) {
        ["static"]=&gt;
        array(2) {
          ["entityPersister"]=&gt;
          object(Doctrine\ORM\Persisters\BasicEntityPersister)#646 (14) {
            ["class":protected]=&gt;
            object(Doctrine\ORM\Mapping\ClassMetadata)#596 (37) {
              ["name"]=&gt;
              string(36) "AppBundle\Entity\TransactionCategory"
              ["namespace"]=&gt;
              string(16) "AppBundle\Entity"
              ["rootEntityName"]=&gt;
              string(36) "AppBundle\Entity\TransactionCategory"
              ["customGeneratorDefinition"]=&gt;
              NULL
              ["customRepositoryClassName"]=&gt;
              NULL
              ["isMappedSuperclass"]=&gt;
              bool(false)
              ["parentClasses"]=&gt;
              array(0) {
              }
              ["subClasses"]=&gt;
              array(0) {
              }
              ["namedQueries"]=&gt;
              array(0) {
              }
              ["namedNativeQueries"]=&gt;
              array(0) {
              }
              ["sqlResultSetMappings"]=&gt;
              array(0) {
              }
  </code></pre>
  
  <p>....</p>
  
  <p>I paste only part od this object, because it is very huge</p>