public function __construct(Context $context, IMapper $mapperOne, IMapper $mapperTwo, PropertyMetadata $metadata)
 {
     $this->context = $context;
     $this->mapperOne = $mapperOne;
     $this->mapperTwo = $mapperTwo;
     $this->metadata = $metadata;
     $parameters = $mapperOne->getManyHasManyParameters($mapperTwo);
     $this->joinTable = $parameters[0];
     if ($this->metadata->relationshipIsMain) {
         $this->targetRepository = $this->mapperTwo->getRepository();
         list($this->primaryKeyFrom, $this->primaryKeyTo) = $parameters[1];
     } else {
         $this->targetRepository = $this->mapperOne->getRepository();
         list($this->primaryKeyTo, $this->primaryKeyFrom) = $parameters[1];
     }
 }