Skip to content

Commit

Permalink
fix(doctrine): fixed orm datefilter applying inner join when no filte…
Browse files Browse the repository at this point in the history
…ring values have been provided (#6849)
  • Loading branch information
psihius authored Dec 6, 2024
1 parent 5111935 commit d312eae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Doctrine/Orm/Filter/DateFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ protected function filterProperty(string $property, $values, QueryBuilder $query
$alias = $queryBuilder->getRootAliases()[0];
$field = $property;

if ($this->isPropertyNested($property, $resourceClass)) {
if ($this->isPropertyNested($property, $resourceClass) && \count($values) > 0) {
[$alias, $field] = $this->addJoinsForNestedProperty($property, $alias, $queryBuilder, $queryNameGenerator, $resourceClass, Join::INNER_JOIN);
}

Expand Down

0 comments on commit d312eae

Please # to comment.