Skip to content

Commit c4b53ae

Browse files
committed
#1930 add missing parent calls
1 parent f6efbf5 commit c4b53ae

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Relations/EmbedsOneOrMany.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ abstract class EmbedsOneOrMany extends Relation
4242
*/
4343
public function __construct(Builder $query, Model $parent, Model $related, string $localKey, string $foreignKey, string $relation)
4444
{
45-
$this->query = $query;
46-
$this->parent = $parent;
47-
$this->related = $related;
4845
$this->localKey = $localKey;
4946
$this->foreignKey = $foreignKey;
5047
$this->relation = $relation;
@@ -55,7 +52,7 @@ public function __construct(Builder $query, Model $parent, Model $related, strin
5552
$this->query = $parentRelation->getQuery();
5653
}
5754

58-
$this->addConstraints();
55+
parent::__construct($query, $parent);
5956
}
6057

6158
/** @inheritdoc */

src/Schema/Blueprint.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class Blueprint extends \Illuminate\Database\Schema\Blueprint
4343
*/
4444
public function __construct(Connection $connection, string $collection)
4545
{
46+
parent::__construct($collection);
47+
4648
$this->connection = $connection;
4749

4850
$this->collection = $this->connection->getCollection($collection);

0 commit comments

Comments
 (0)