public function detectRelationshipEntityChanges()
{
$managed = [];
foreach ($this->relationshipEntityStates as $oid => $state) {
if ($state === self::STATE_MANAGED) {
$managed[] = $oid;
}
}
foreach ($managed as $oid) {
$reA = $this->reEntitiesById[$this->reEntityIds[$oid]];
$reB = $this->relationshipEntityReferences[$this->reEntityIds[$oid]];
$this->computeRelationshipEntityChanges($reA, $reB);
$this->checkRelationshipEntityDeletions($reA);
}
}