File tree Expand file tree Collapse file tree
Resources/Database/Columns Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -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 ' ]['relatedCollection ' ],
80+ relatedTable: $ array ['options ' ]['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 ['relatedCollection ' ];
98+ return $ this ->options ['relatedTable ' ] ?? $ this -> options [ ' relatedCollection ' ];
9999 }
100100
101101 public function getRelationType (): string
Original file line number Diff line number Diff line change @@ -923,7 +923,7 @@ private function exportColumns(int $batchSize): void
923923 $ col = new Relationship (
924924 $ column ['key ' ],
925925 $ table ,
926- relatedTable: $ column ['relatedCollection ' ],
926+ relatedTable: $ column ['relatedTable ' ] ?? $ column [ ' relatedCollection ' ],
927927 relationType: $ column ['relationType ' ],
928928 twoWay: $ column ['twoWay ' ],
929929 twoWayKey: $ column ['twoWayKey ' ],
You can’t perform that action at this time.
0 commit comments