public function addRelationshipToIdentifier($relationshipId, $identifier)
{
if (isset($this->identifiers[$identifier])) {
foreach ($this->identifiers[$identifier] as $rel) {
if ($rel instanceof Relationship && $rel->getId() === $relationshipId) {
return;
}
}
}
$this->identifiers[$identifier][] = $this->getRelationship($relationshipId);
}