Skip to content

Commit

Permalink
Merge b206009 into 5fa9b56
Browse files Browse the repository at this point in the history
  • Loading branch information
norkunas committed Dec 2, 2019
2 parents 5fa9b56 + b206009 commit a8e4257
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Bridge/Doctrine/Orm/Filter/SearchFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
use ApiPlatform\Core\Exception\InvalidArgumentException;
use Doctrine\Common\Persistence\ManagerRegistry;
use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\QueryBuilder;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\RequestStack;
Expand Down Expand Up @@ -85,17 +84,14 @@ protected function filterProperty(string $property, $value, QueryBuilder $queryB
[$alias, $field, $associations] = $this->addJoinsForNestedProperty($property, $alias, $queryBuilder, $queryNameGenerator, $resourceClass);
}

/**
* @var ClassMetadata
*/
$metadata = $this->getNestedMetadata($resourceClass, $associations);

$values = $this->normalizeValues((array) $value, $property);
if (null === $values) {
return;
}

$caseSensitive = true;
$metadata = $this->getNestedMetadata($resourceClass, $associations);

if ($metadata->hasField($field)) {
if ('id' === $field) {
$values = array_map([$this, 'getIdFromValue'], $values);
Expand Down

0 comments on commit a8e4257

Please sign in to comment.