Last active
August 29, 2015 14:01
-
-
Save elnur/116db7b846036d32712c to your computer and use it in GitHub Desktop.
How to Enable the Underscore Naming Strategy for Doctrine ORM in Symfony http://elnur.pro/how-to-enable-the-underscore-naming-strategy-for-doctrine-orm-in-symfony/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| doctrine: | |
| orm: | |
| naming_strategy: doctrine.orm.naming_strategy.underscore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE super_user | |
| ( | |
| first_name varchar, | |
| last_name varchar | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class SuperUser | |
| { | |
| private $firstName; | |
| private $lastName; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Doctrine\ORM\Mapping\Table; | |
| use Doctrine\ORM\Mapping\Column; | |
| /** | |
| * @Table("super_user") | |
| */ | |
| class SuperUser | |
| { | |
| /** | |
| * @Column("first_name") | |
| */ | |
| private $firstName; | |
| /** | |
| * @Column("last_name") | |
| */ | |
| private $lastName; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment