public function Persist(Relational\Transaction $Transaction, Relational\ResultRow $ParentData, Relational\RelationshipChange $RelationshipChange)
{
if ($RelationshipChange->HasPersistedRelationship()) {
$PersistedRelationship = $RelationshipChange->GetPersistedRelationship();
if ($PersistedRelationship->IsIdentifying()) {
$ParentRow = $ParentData->GetRow($this->GetParentTable());
$ChildRow = $PersistedRelationship->GetChildResultRow()->GetRow($this->GetTable());
$this->PersistIdentifyingRelationship($Transaction, $ParentRow, $ChildRow);
} else {
$RelatedPrimaryKey = $PersistedRelationship->GetRelatedPrimaryKey();
if ($this->IsInversed()) {
$this->GetForeignKey()->MapParentToReferencedKey($RelatedPrimaryKey, $ParentData);
} else {
$this->GetForeignKey()->MapReferencedToParentKey($RelatedPrimaryKey, $ParentData);
}
}
}
}