Skip to content

Commit

Permalink
Merge pull request #123 from analogueorm/fix/has-many-through
Browse files Browse the repository at this point in the history
Fix hasManyThrough __construct()
  • Loading branch information
RemiCollin authored Aug 4, 2016
2 parents 64105d1 + 5afbb69 commit 5947bea
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Relationships/HasManyThrough.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ public function __construct(Mapper $mapper, $farParent, $parentMap, $firstKey, $
$this->secondKey = $secondKey;
$this->farParent = $farParent;

$this->farParentMap = $this->relatedMapper->getManager()->mapper($farParent)->getEntityMap();

$parentInstance = $this->relatedMapper->getManager()->mapper($parentMap->getClass())->newInstance();
$this->farParentMap = $mapper->getManager()->mapper($farParent)->getEntityMap();
$parentInstance = $mapper->getManager()->mapper($parentMap->getClass())->newInstance();

parent::__construct($mapper, $parentInstance);
}
Expand Down

0 comments on commit 5947bea

Please sign in to comment.