mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Use table prefix with reverse enginering didn't works #6395
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @julienheroux on GitHub (Jan 31, 2020).
Bug Report
Summary
Doctrine revers enginering don't work with tablePrefix ([https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/cookbook/sql-table-prefixes.html])
Current behavior
If i defined a table prefixe or suffix , and try a reverse enginering, the entity are not generated correctly.
for exemple a table name pfx_article the generated article entity will be named PfxArticle
and the entity annotation will look like this
How to reproduce
Create a tablePrefix ([https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/cookbook/sql-table-prefixes.html])
Generate entity from schema (bin/console doctrine:mapping:import "App\Entity" annotation --path=src/Entity)
open your entity class you will see the problem in the annotation
Expected behavior
I think that normally the article entity should be name Article and the entity annotation will look like this