title: Symfony2 acces doctrine in entity
body: <p>There is my entity:</p>
  
  <h1>Entity</h1>
  
  <pre><code>namespace Catalog\WebBundle\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  
  class ComCompany
  {
  
      private $entityManager;
  
      public function setEntityManager(EntityManager $entityManager)
      {
          $this-&gt;entityManager = $entityManager;
      }
  
      public function getCmpCategory()
      {
           return  $customer = $this
                  -&gt;entityManager
                  -&gt;getRepository('CatalogWebBundle:ComCategory')
                  -&gt;findOneBycmpCat('123123');
      }
  
  
  }
  </code></pre>
  
  <h1>Services.yml</h1>
  
  <pre><code>services:
  catalog_web.comcompany:
      class: Catalog\WebBundle\Entity\ComCompany
      calls:
          - [ setEntityManager, [ @doctrine.orm.entity_manager ]]
  </code></pre>
  
  <p>I'm getting error: </p>
  
  <p><em>InvalidArgumentException: There is no extension able to load the configuration for "catalog_web.comcompany" (in /home/katalogas/domains/ekatalogas.eu/public_html/src/Catalog/WebBundle/DependencyInjection/../Resources/config/services.yml). Looked for namespace "catalog_web.comcompany", found none</em></p>
  
  <p>I'm not understant what problam is in services.yml configuration file.</p>