public function addRelationship(Relationship $relationship)
    {
        foreach ($this->relationships as $rel) {
            if ($rel->getType() === $relationship->getType() &&
            $rel->getStartNode() === $relationship->getStartNode() &&
            $rel->getEndNode() === $relationship->getEndNode()) {
                throw new SchemaDefinitionException(sprintf('There is already a relationship declared with TYPE "%s" and STARTNODE "%s" and ENDNODE "%s"',
                    $relationship->getType(), $relationship->getStartNode(), $relationship->getEndNode()));
            }
        }

        return $this->relationships->add($relationship);
    }