/**
* Get an array containing an array of foreign entities to remove the local entity from, and an array of foreign
* entities to add the local entity to and an array of entities which remain the same in the relationship
*
* @param string $key Local relationship key
* @param Relationship $relationship Relationship in question
* @param object|object[] $new_value New local value containing foreign entities
* @return array
*/
private function getRelationshipDeltas($key, Relationship $relationship, $new_value)
{
$this->getDriver()->debugLog('Getting inverse relationship deltas: ' . $key);
if (RelationshipType::isMultiIndex($relationship->getRelationshipType())) {
return $this->getRelationshipDeltasMulti($key, $new_value);
} else {
return $this->getRelationshipDeltasSingle($key, $new_value);
}
}