Bravo3\Orm\Services\RelationshipManager::getRelationshipDeltas PHP Method

getRelationshipDeltas() private method

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
private getRelationshipDeltas ( string $key, Relationship $relationship, object | object[] $new_value ) : array
$key string Local relationship key
$relationship Bravo3\Orm\Mappers\Metadata\Relationship Relationship in question
$new_value object | object[] 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);
        }
    }