Last Updated: February 25, 2016
·
2.666K
· Dom Does

Implementing a Doctrine2 naming strategy in Symfony2

Create a naming strategy as per the Doctrine2 documentation:

http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/namingstrategy.html

Register that class as a service, and reference it in your config.yml as so:

orm:
    default_entity_manager: em1
    entity_managers:
        em1:
            mappings:
                YamlBundle: ~
            naming_strategy: my_bundle.naming_strategy.default