Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrecognized options "naming_strategy, auto_mapping" under "doctrine.orm" #8

Open
sterichards opened this issue Jun 4, 2018 · 1 comment

Comments

@sterichards
Copy link

This is the Symfony2 error I get, after the library installation, when adding the config and clearing the cache

@jdeniau
Copy link
Member

jdeniau commented Jun 4, 2018

IIRC with doctrine, you have 2 ways of configuring entity managers, one "helper" that makes only one entity manager available :

doctrine:
  orm:
    mappings: []
    auto_mapping: false

and the other one that is more verbose but supports multiple entity managers:

doctrine:
  orm:
    entity_managers:
      some_em:
        mappings: []
        auto_mapping: false

Either you need to use the first syntax with:

doctrine:
    orm:
        dql:
            numeric_functions:
                rand:        Mapado\MysqlDoctrineFunctions\DQL\MysqlRand
                round:       Mapado\MysqlDoctrineFunctions\DQL\MysqlRound
            datetime_functions:
                date:        Mapado\MysqlDoctrineFunctions\DQL\MysqlDate
                date_format: Mapado\MysqlDoctrineFunctions\DQL\MysqlDateFormat
                # ... add all functions you need

or you need to switch to the verbose syntax

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants