title: Getting parent repository within service instead of the child I am calling Symfony2.8
body: <p>I've looked around for a solution but I seem to have ticked all the boxes with regards to what has already been posted for this issue, My services.yml has been looked over repeatedly and everything seems to be registered correctly. The issue i'm having is that in one of my services, i need to get access to a specific repository but my debugger tells me that its getting the parent of the one I'm looking for instead. Ill paste the code from my service below, maybe someone can see something i've missed. Hope someone can help me because my eyes are square from trying to find the issue.</p>
  
  <pre><code>&lt;?php
  
  namespace AppBundle\Service;
  
  use AppBundle\Repository\DeviceSettingsRepository;
  use Symfony\Component\DependencyInjection\ContainerBuilder;
  
  class DeviceSettingsService {
  
      /** @var  DeviceSettingsRepository */
      protected $deviceSettingsRepository;
  
      /**
       * DeviceSettingsService constructor.
       * @param $deviceSettingsRepository
       */
      public function __construct($deviceSettingsRepository) {
  
          $this-&gt;deviceSettingsRepository = $deviceSettingsRepository;
      }
  
      public function updateGpsModeByDeviceId($deviceId, $mode) {
  
          $this-&gt;deviceSettingsRepository-&gt;updateGpsModeByDeviceId($deviceId, $mode);
      }
  }
  
  
  parameters:
  #    parameter_name: value
      deviceSettingsRepository.factory_argument : 'AppBundle:Mongo\EmbDocument\DeviceSettings'
  
  services:
    deviceSettingsRepository:
             class: AppBundle\Repository\DeviceSettingsRepository
             factory_service: doctrine_mongodb
             factory_method:  getRepository
             arguments:
             - %deviceSettingsRepository.factory_argument%
  
    deviceSettingsService:
              class: AppBundle\Service\DeviceSettingsService
              arguments: ['@deviceSettingsRepository']
  </code></pre>