protected function createCollection()
{
if ($this->metadata->relationship->isMain) {
$mapperOne = $this->parent->getRepository()->getMapper();
$mapperTwo = $this->getTargetRepository()->getMapper();
} else {
$mapperOne = $this->getTargetRepository()->getMapper();
$mapperTwo = $this->parent->getRepository()->getMapper();
}
$collection = $mapperOne->createCollectionManyHasMany($mapperTwo, $this->metadata, $this->parent);
return $this->applyDefaultOrder($collection);
}