Skip to content

Commit e407ba5

Browse files
committed
#1930 move parent constructor call down, removed duplicate assignments
1 parent 6e95567 commit e407ba5

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Relations/EmbedsOneOrMany.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ abstract class EmbedsOneOrMany extends Relation
4343
*/
4444
public function __construct(Builder $query, Model $parent, Model $related, string $localKey, string $foreignKey, string $relation)
4545
{
46-
parent::__construct($query, $parent);
47-
48-
$this->query = $query;
49-
$this->parent = $parent;
5046
$this->related = $related;
5147
$this->localKey = $localKey;
5248
$this->foreignKey = $foreignKey;
@@ -58,7 +54,7 @@ public function __construct(Builder $query, Model $parent, Model $related, strin
5854
$this->query = $parentRelation->getQuery();
5955
}
6056

61-
$this->addConstraints();
57+
parent::__construct($query, $parent);
6258
}
6359

6460
/** @inheritdoc */

0 commit comments

Comments
 (0)