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();
}