public function getRelationshipType() { if (!$this->isRelationshipEntity()) { throw new MappingException(sprintf('This class metadata is not for a relationship entity')); } return $this->entityAnnotation->type; }