Skip to content

Commit 8efed0b

Browse files
committed
Remove partial select
1 parent 4d6c532 commit 8efed0b

File tree

2 files changed

+22
-114
lines changed

2 files changed

+22
-114
lines changed

src/Bridge/Doctrine/Orm/Extension/EagerLoadingExtension.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -159,24 +159,6 @@ private function joinRelations(QueryBuilder $queryBuilder, string $resourceClass
159159
$associationAlias = $relationAlias.$i++;
160160
$queryBuilder->{$method}($originAlias.'.'.$association, $associationAlias);
161161
++$joinCount;
162-
$select = [];
163-
$targetClassMetadata = $entityManager->getClassMetadata($mapping['targetEntity']);
164-
165-
foreach ($this->propertyNameCollectionFactory->create($mapping['targetEntity']) as $property) {
166-
$propertyMetadata = $this->propertyMetadataFactory->create($mapping['targetEntity'], $property, $propertyMetadataOptions);
167-
168-
if (true === $propertyMetadata->isIdentifier()) {
169-
$select[] = $property;
170-
continue;
171-
}
172-
173-
//the field test allows to add methods to a Resource which do not reflect real database fields
174-
if (true === $targetClassMetadata->hasField($property) && true === $propertyMetadata->isReadable()) {
175-
$select[] = $property;
176-
}
177-
}
178-
179-
$queryBuilder->addSelect(sprintf('partial %s.{%s}', $associationAlias, implode(',', $select)));
180162

181163
$relationAlias .= ++$j;
182164

0 commit comments

Comments
 (0)