Skip to content

Commit cf1e3c5

Browse files
committed
Fix relationships
1 parent 98c9972 commit cf1e3c5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Migration/Resources/Database/Columns/Relationship.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(
2424
$key,
2525
$table,
2626
options: [
27-
'relatedTable' => $relatedTable,
27+
'relatedCollection' => $relatedTable,
2828
'relationType' => $relationType,
2929
'twoWay' => $twoWay,
3030
'twoWayKey' => $twoWayKey,
@@ -77,7 +77,7 @@ public static function fromArray(array $array): self
7777
return new self(
7878
$array['key'],
7979
Table::fromArray($array['table'] ?? $array['collection']),
80-
relatedTable: $array['options']['relatedTable'] ?? $array['options']['relatedCollection'],
80+
relatedTable: $array['options']['relatedCollection'],
8181
relationType: $array['options']['relationType'],
8282
twoWay: $array['options']['twoWay'],
8383
twoWayKey: $array['options']['twoWayKey'],
@@ -95,7 +95,7 @@ public function getType(): string
9595

9696
public function getRelatedTable(): string
9797
{
98-
return $this->options['relatedTable'] ?? $this->options['relatedCollection'];
98+
return $this->options['relatedCollection'];
9999
}
100100

101101
public function getRelationType(): string

0 commit comments

Comments
 (0)