public function __construct(JoinTable $JoinTable, $RelatesToTableTwo = true) { parent::__construct($RelatesToTableTwo ? $JoinTable->GetForeignKey2() : $JoinTable->GetForeignKey1(), $RelatesToTableTwo ? $JoinTable->GetTable2() : $JoinTable->GetTable1(), Relational\DependencyOrder::After, Relational\DependencyOrder::Before); $this->JoinTable = $JoinTable; $this->RelatesToTableTwo = $RelatesToTableTwo; $this->ParentForeignKey = !$this->RelatesToTableTwo ? $this->JoinTable->GetForeignKey2() : $this->JoinTable->GetForeignKey1(); }
public function __construct(ForeignKey $ForeignKey) { parent::__construct($ForeignKey, $ForeignKey->GetParentTable(), Relational\DependencyOrder::Before, Relational\DependencyOrder::Before); }