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

Invalid integration doc for symfony

alexandrmazur96 opened this issue · comments

Hi guys!

In your doc, described integration with symfony you write:

doctrine:
    orm:
        entity_managers:
            your_connection:
                dql:
                    string_functions:
                        # alternative implementation of ALL() and ANY() where subquery is not required, useful for arrays
                        ALL_OF: MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\All
                        ANY_OF: MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Any

But this not working for symfony 4.*

I solved the problem via:

doctrine:
    orm:
        dql:
            string_functions:
                PG_ALL: MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\All
                PG_ANY: MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Any

Check this, maybe for different connection need other config, but your config not working with default connection.

Hi @alexandrmazur96,

The quoted example refers to the full (extended) configuration for Doctrine, that supports multiple EntityManager-s and Connection-s. You can read more about it here, there are also some examples.

Oh, ok. I had one entity_manager with default connection and I build my configuration in wrong way. Thx for answer! I think it would be great to add it to doc