public function build(ClassMetadataBuilder $builder) { if ($this->association->getAssociationType() == OneToOneAssociation::TYPE_OWNING) { $builder->addOwningOneToOne($this->association->getComputedTargetPropertyName(), $this->association->getTargetEntity()->getName(), $this->association->getComputedInversedByPropertyName()); } else { $builder->addInverseOneToOne($this->association->getComputedTargetPropertyName(), $this->association->getTargetEntity()->getName(), $this->association->getComputedInversedByPropertyName()); } }