title: doctrine $entityManager->getRepository
body: <p>I'm newer with php and doctrine. I'm trying to create a small project and I have a problem when I try a findAll method. No errors are showed when I executed it.</p>
  
  <p>This is my Canales.php class (in <code>/src/model/dto</code> folder)</p>
  
  <pre><code>&lt;?php
  
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * Canales
   *
   * @ORM\Table(name="Canales")
   * @ORM\Entity
   */
  class Canales
  {
      /**
       * @var string
       *
       * @ORM\Column(name="Nombre", type="string", length=255, nullable=false)
       */
      private $nombre;
  
      /**
       * @var string
       *
       * @ORM\Column(name="URL", type="string", length=255, nullable=false)
       */
      private $url;
  
      /**
       * @var string
       *
       * @ORM\Column(name="imagen", type="string", length=255, nullable=false)
       */
      private $imagen;
  
      /**
       * @var boolean
       *
       * @ORM\Column(name="Ingles", type="boolean", nullable=false)
       */
      private $ingles;
  
      /**
       * @var integer
       *
       * @ORM\Column(name="Id", type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="IDENTITY")
       */
      private $id;
  
      /**
       * Class Constructor
       */
      public function __construct()
      {
          $this-&gt;nombre = null;
          $this-&gt;url = null;
          $this-&gt;imagen = null;
          $this-&gt;ingles = null;
          $this-&gt;id = null;
      }
  
      /**
       * Class Constructor
       * @param    $nombre   
       * @param    $url   
       * @param    $imagen   
       * @param    $ingles   
       * @param    $id   
       */
      public function __construct($nombre, $url, $imagen, $ingles, $id)
      {
          $this-&gt;nombre = $nombre;
          $this-&gt;url = $url;
          $this-&gt;imagen = $imagen;
          $this-&gt;ingles = $ingles;
          $this-&gt;id = $id;
      }
  
  
  
      /**
       * Set nombre
       *
       * @param string $nombre
       * @return Canales
       */
      public function setNombre($nombre)
      {
          $this-&gt;nombre = $nombre;
  
          return $this;
      }
  
      /**
       * Get nombre
       *
       * @return string 
       */
      public function getNombre()
      {
          return $this-&gt;nombre;
      }
  
      /**
       * Set url
       *
       * @param string $url
       * @return Canales
       */
      public function setUrl($url)
      {
          $this-&gt;url = $url;
  
          return $this;
      }
  
      /**
       * Get url
       *
       * @return string 
       */
      public function getUrl()
      {
          return $this-&gt;url;
      }
  
      /**
       * Set imagen
       *
       * @param string $imagen
       * @return Canales
       */
      public function setImagen($imagen)
      {
          $this-&gt;imagen = $imagen;
  
          return $this;
      }
  
      /**
       * Get imagen
       *
       * @return string 
       */
      public function getImagen()
      {
          return $this-&gt;imagen;
      }
  
      /**
       * Set ingles
       *
       * @param boolean $ingles
       * @return Canales
       */
      public function setIngles($ingles)
      {
          $this-&gt;ingles = $ingles;
  
          return $this;
      }
  
      /**
       * Get ingles
       *
       * @return boolean 
       */
      public function getIngles()
      {
          return $this-&gt;ingles;
      }
  
      /**
       * Get id
       *
       * @return integer 
       */
      public function getId()
      {
          return $this-&gt;id;
      }
  }
  </code></pre>
  
  <p>My composer.json</p>
  
  <pre><code>    {
      "require": {
          "doctrine/orm": "2.4.*",
          "symfony/yaml": "2.*"
      },
      "autoload": {
          "psr-0": {"": "src/"}
      }
  }
  </code></pre>
  
  <p>my DaoGenerico class</p>
  
  <pre><code>    require_once("bootstrap.php");
      function showAction(){
      $repository = $entityManager-&gt;getRepository('Canales');
      echo "..";
      $productos = $repository-&gt;findAll();
      echo "OK";
      if (!$productos) {
          throw $this-&gt;createNotFoundException(
              'No product found for id '.$id
          );
      }
      else{
          var_dump($productos);
      }
  }
  </code></pre>
  
  <p>and my prueba.php</p>
  
  <pre><code>&lt;?php
  include('./src/model/dao/daoGenerico.php');
  
  showAction();
  ?&gt;
  </code></pre>
  
  <p>As I said before, when I execute the method <code>showAction</code> in <code>daoGenerico.php</code>, no errors are showed but I think that the problem is in using <code>getRepository('Canales')</code> method, maybe Doctrine doesn't find Canales because the next line <code>echo ".."</code> never is showed;</p>
  
  <p>Any advice or idea? how could I show the errors?</p>
  
  <p>thanks in advance</p>
  
  <p>EDIT.</p>
  
  <p>I paste the bootstrap.php too</p>
  
  <pre><code>use Doctrine\ORM\Tools\Setup;
  use Doctrine\ORM\EntityManager;
  
  require_once "vendor/autoload.php";
  
  // Create a simple "default" Doctrine ORM configuration for Annotations
  $isDevMode = true;
  //$config = Setup::createAnnotationMetadataConfiguration(array(__DIR__."/src"), $isDevMode);
  // or if you prefer yaml or XML
  $config = Setup::createXMLMetadataConfiguration(array(__DIR__."/config/xml"), $isDevMode);
  //$config = Setup::createYAMLMetadataConfiguration(array(__DIR__."/config/yaml"), $isDevMode);
  
  // database configuration parameters
  $conn = array(
      'driver'   =&gt; 'pdo_mysql',
      'host'     =&gt; 'localhost',
      'user'     =&gt; 'root',
      'password' =&gt; 'root',
      'dbname'   =&gt; 'yoga',
      'charset'  =&gt; 'UTF8',
  );
  
  // obtaining the entity manager
  $entityManager = EntityManager::create($conn, $config);
  </code></pre>