I try to use functions provided by https://github.com/martin-georgiev/postgresql-for-doctrine/ but Symfony returns this error :
Error: Class 'JSONB_ARRAY_ELEMENTS' is not defined.
Here is the code of my function in the repository file:
$query = $this->createQueryBuilder('p')
->from('JSONB_ARRAY_ELEMENTS(CAST(p.wp_syncs AS JSONB))', 'pwps')
->getQuery()
->getResult();
The function is activated in doctrine.yaml:
dql:
string_functions:
# ...
JSONB_ARRAY_ELEMENTS: MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonbArrayElements