private function buildEntityJoin(&$select, &$join, EntityField &$entityField, Entity $parentEntity) { if ($entityField->isJoinedEntity()) { $this->buildJoinColumn($select, $join, $entityField, $parentEntity); } else { if ($entityField->isMappedEntity()) { $this->buildMappedBy($select, $join, $entityField, $parentEntity); } } }
private function fetchComposedEntity(Entity $entity, EntityField $entityField) { if ($entityField->isJoinedEntity()) { $entity->setParameterValue($entityField->getParameterName(), $this->fetchJoinedCompositeEntity($entityField->getCompositeEntity(), $entity->getParameterValue($entityField->getParameterName()))); } else { if ($entityField->isMappedEntity()) { if ($entityField->getRelation() === "oneToMany" || $entityField->getRelation() === "manyToMany") { $entity->setParameterValue($entityField->getParameterName(), $this->fetchMappedCompositeEntities($entityField, $entity->getIdValue())); } else { if ($entityField->getRelation() === "oneToOne" || $entityField->getRelation() === "ManyToOne") { $entity->setParameterValue($entityField->getParameterName(), $this->fetchMappedCompositeEntity($entityField, $entity->getIdValue())); } } } } }