Last Updated: February 25, 2016
·
3.115K
· 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

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.

Security insights from Cside