Commit 517c5417 authored by Emma's avatar Emma 🦉

hopefully fix qb parameter types for older pgsql

parent 211cbd34
Pipeline #54283935 passed with stages
in 8 minutes and 38 seconds
......@@ -89,13 +89,17 @@ final class SearchRepository {
->addSelect("ts_rank(search_doc, plainto_tsquery(:query)) AS search_rank")
->from($table, 'e')
->where('search_doc @@ plainto_tsquery(:query)')
->setParameter('entity', self::ENTITY_TYPES[$entityClass])
->setParameter('query', $options['query'])
->setParameter('entity', self::ENTITY_TYPES[$entityClass], Type::TEXT)
->setParameter('query', $options['query'], Type::TEXT)
->orderBy('search_rank', 'DESC')
return $this->em->createNativeQuery($qb->getSQL(), $rsm)
$nativeQuery = $this->em->createNativeQuery($qb->getSQL(), $rsm);
foreach ($qb->getParameters() as $key => $value) {
$nativeQuery->setParameter($key, $value, $qb->getParameterType($key));
return $nativeQuery->execute();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment