private function MapRelationshipToJoinRow($Relationship) { if ($this->RelatesToTableTwo) { return $this->JoinTable->JoinRow($Relationship->GetParentPrimaryKey(), $Relationship->GetRelatedPrimaryKey()); } else { return $this->JoinTable->JoinRow($Relationship->GetRelatedPrimaryKey(), $Relationship->GetParentPrimaryKey()); } }