Skip to content

Commit

Permalink
Merge pull request #2032 from bolt/bugfix/mutli-value-taxonomy-setcon…
Browse files Browse the repository at this point in the history
…tent

Multivalue querying does not break for taxonomies
  • Loading branch information
bobdenotter authored Oct 22, 2020
2 parents 7e19b21 + a86360f commit dd7b09a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Storage/SelectQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,11 @@ private function getTaxonomyFieldExpression(Filter $filter): string
{
$this->taxonomyJoins[$filter->getKey()] = $filter;

return sprintf('taxonomies_%s.slug = :%s', $filter->getKey(), key($filter->getParameters()));
$originalExpression = $filter->getExpression();
$originalLeftExpression = '/content\.([^\s])*/';
$newLeftExpression = sprintf('taxonomies_%s.slug', $filter->getKey());

return preg_replace($originalLeftExpression, $newLeftExpression, $originalExpression);
}

private function getRegularFieldExpression(Filter $filter, EntityManagerInterface $em): string
Expand Down

0 comments on commit dd7b09a

Please sign in to comment.