protected function clearRelationship(string $name): void
    {
        // Clear from the left
        unset($this->relationships[$name]);

        // And clear from the right
        foreach ($this->relationships as $left => &$objectNames) {
            if (isset($objectNames[$name])) {
                unset($objectNames[$name]);
            }
        }
    }