title: Inject Container in Entity Repository
body: <p>I want to get Current locale in my Repository.That's why I am injecting the Container into my Repository but I am getting error that I am unable to figure it out.
  This is my <code>service.yml</code> code</p>
  
  <pre><code>survey.repository.container_aware:
      class: Demo\SurveyBundle\Repository\SurveyRepository
      calls:
          - [ setContainer, [ @service_container ] ]
  </code></pre>
  
  <p>and this is my repository class code</p>
  
  <pre><code>.......
  
  use Symfony\Component\DependencyInjection\ContainerInterface as Container;
  
  .......
  
  protected $container;
  
  public function __construct(Container $container) {
       $this-&gt;container = $container;
  }
  </code></pre>
  
  <p>After that I am getting below error</p>
  
  <pre><code>ContextErrorException: Catchable Fatal Error: Argument 1 passed to 
  Demo\SurveyBundle\Entity\SurveyRepository::__construct() must implement 
  interface Symfony\Component\DependencyInjection\ContainerInterface, instance of
  Doctrine\ORM\EntityManager given
  </code></pre>
  
  <p>What I am missing in my construct or in service?</p>