Different table name and entity name in Symfony2 Different table name and entity name in Symfony2 symfony symfony

Different table name and entity name in Symfony2


you can set the name of the table using the @ORM\Table annotation

/** * @ORM\Entity * @ORM\Table(name="transactions") */class Transaction{

If you don't use Annotations, you can find details about other mappings from this link.

BTW, You can also generate Entities from an Existing Database.