martin-georgiev / postgresql-for-doctrine

PostgreSQL enhancements for Doctrine. Provides support for advanced data types (json, jssnb, arrays), text search, array operators and jsonb specific functions.

Home Page:https://packagist.org/packages/martin-georgiev/postgresql-for-doctrine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

symfony / doctrine configuration help

tacman opened this issue · comments

None of the functions are registered. I'm stuck on how to configure this correctly.

        $queryBuilder = $instanceRepository->createQueryBuilder('i')
            ->andWhere('CONTAINS(i.attributes, :attr)')
            ->setParameter('attr', 'year');

throw


assert($token !== null)

CONTAINS() needs = TRUE to work:

$queryBuilder = $instanceRepository->createQueryBuilder('i')
            ->andWhere('CONTAINS(i.attributes, :attr) = TRUE')
            ->setParameter('attr', 'year');