Skip to content

Commit

Permalink
made text concat case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Patzer committed Jul 30, 2018
1 parent e205a33 commit 5271469
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Filter/Type/TextConcatType.php
Expand Up @@ -43,14 +43,14 @@ public function buildQuery(FilterQueryBuilder $builder, FilterConfigElementModel
'," ",',
array_map(
function ($field) use ($filter) {
return 'COALESCE('.$filter['dataContainer'].'.'.$field.', "")';
return 'COALESCE(LOWER('.$filter['dataContainer'].'.'.$field.'), "")';
},
$fields
)
).')';

$builder->andWhere($builder->expr()->like($concat, $wildcard));
$builder->setParameter($wildcard, '%'.$data[$name].'%');
$builder->setParameter($wildcard, '%'.strtolower($data[$name]).'%');
}

/**
Expand Down

0 comments on commit 5271469

Please sign in to comment.