title: Doctrine Entity returning NULL in all attributes (except ID) (DOCTRINE2 + ZF2)
body: <p>I'm doing a query using a repository.
  The return comes only with the correct ID, the rest of the attributes are NULL but in the database all are filled in correctly. What is going on?</p>
  
  <p><strong>Return:</strong></p>
  
  <pre><code>object(UserBundle\Entity\User)#428 (15) { ["id":"UserBundle\Entity\User":private]=&gt; int(1) ["name":"UserBundle\Entity\User":private]=&gt; NULL ["company":"UserBundle\Entity\User":private]=&gt; NULL ["cpf":"UserBundle\Entity\User":private]=&gt; NULL ["cnpj":"UserBundle\Entity\User":private]=&gt; NULL ["email":"UserBundle\Entity\User":private]=&gt; NULL ["password":"UserBundle\Entity\User":private]=&gt; NULL ["hash":"UserBundle\Entity\User":private]=&gt; NULL ["plan":"UserBundle\Entity\User":private]=&gt; NULL ["released":"UserBundle\Entity\User":private]=&gt; NULL ["is_admin":"UserBundle\Entity\User":private]=&gt; NULL ["created_at":"UserBundle\Entity\User":private]=&gt; NULL ["updated_at":"UserBundle\Entity\User":private]=&gt; NULL ["original_password":"UserBundle\Entity\User":private]=&gt; NULL ["hydrator":"Base\Entity\AbstractEntity":private]=&gt; NULL }
  </code></pre>
  
  <p><strong>My Entity (User):</strong></p>
  
  <p><a href="http://pastebin.com/SBnPYY63" rel="nofollow">http://pastebin.com/SBnPYY63</a></p>
  
  <p><strong>My Repository (User):</strong></p>
  
  <p><a href="http://pastebin.com/56rwhtmZ" rel="nofollow">http://pastebin.com/56rwhtmZ</a></p>
  
  <p><strong>My 'query':</strong></p>
  
  <pre><code>$repository = $this-&gt;em-&gt;getRepository('UserBundle\Entity\User');
          $user = $repository-&gt;findByEmailAndPassword('email@email.com', 'password');
  </code></pre>
  
  <p>My BD configuration file (doctrine_orm.local.php):</p>
  
  <pre><code>&lt;?php
  
  return array(
      'doctrine' =&gt; array(
          'configuration' =&gt; array(
              'orm_default' =&gt; array(
                  'metadata_cache' =&gt; 'array',
                  'query_cache' =&gt; 'array',
                  'result_cache' =&gt; 'array',
                  'hydration_cache' =&gt; 'array',
                  'generate_proxies' =&gt; true,
                  'proxy_dir' =&gt; 'data/DoctrineORMModule/Proxy',
                  'proxy_namespace' =&gt; 'DoctrineORMModule\Proxy',
              )
          ),
          'connection' =&gt; array(
              'orm_default' =&gt; array(
                  'driverClass' =&gt; 'Doctrine\DBAL\Driver\PDOMySql\Driver',
                  'params' =&gt; array(
                      'host' =&gt; 'localhost',
                      'port' =&gt; '3306',
                      'user' =&gt; 'root',
                      'password' =&gt; '',
                      'dbname' =&gt; 'my-project',
                      'driverOptions' =&gt; array(
                          PDO::MYSQL_ATTR_INIT_COMMAND =&gt; "SET SESSION sql_mode='ALLOW_INVALID_DATES'",
                          PDO::MYSQL_ATTR_INIT_COMMAND =&gt; "SET NAMES 'UTF8'"
                      )
                  )
              )
          )
      )
  );
  </code></pre>