3

Error : InvalidConfigurationException: Unrecognized options "auto_mapping" under "doctrine.orm"

This is my config.yml file code

# Doctrine Configuration
doctrine:
    dbal:
        default_connection: default
        connections:
            default:
                driver:   "%database_driver%"
                host:     "%database_host%"
                port:     "%database_port%"
                dbname:   "%database_name%"
                user:     "%database_user%"
                password: "%database_password%"
                charset:  UTF8
            symfonydb:
                driver:   pdo_mysql
                host:     localhost
                port:     null
                dbname:   symfony
                user:     root
                password: null
                charset:  UTF8
        # if using pdo_sqlite as your database driver, add the path in parameters.yml
        # e.g. database_path: "%kernel.root_dir%/data/data.db3"
        # path:     "%database_path%"

    orm:
        auto_generate_proxy_classes: "%kernel.debug%"
        auto_mapping: true
        default_entity_manager: default    <<<<<<<<<<
        entity_managers:
            default:
                connection: default
                mappings:
                    AcmeDemoBundle:  ~
                    AcmeUserBundle: ~
            symfonydb:
                connection: symfonydb
                mappings:
                    FooNewsBundle: ~    <<<<<<<<<

If I remove code which is after auto_mapping: true, then it works fine and not throw any error. So what is the problem?

Thnaks.

1 Answer 1

2

Have a look at this GitHub issue: Problem with installation?

The auto_mapping entry goes under the entity_managers.default node, not on the root of the orm node.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.