-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
postgres multiple schema creates invalid entities #7000
Comments
No, this is a long standing issue that was never solved because not worth solving, as the entity generators are being deprecated (2.7) and removed (3.0) from the ORM. Specifically, any kind of special character in the name of the table will result in an invalid class name. Closing as |
Invalid table name characters? That doesn't match what I am talking about... The table name is "market", the schema name is "incoming". |
if this was never solved, how does the community use doctrine with multiple schemas? |
Try a dash or a space in a table name, for example.
Yes, just not in core ORM. There are already existing tools for generating code when given mapping definitions, so we will provide a migration path, but we no longer endorse nor support the practice in this project due to widespread abuse of these tools, leading to extremely anemic, under-performing and hard to maintain software projects (plus the ORM gers the blame for that: combo!)
At least with ORM core only (this project): yes. As for your current scenario, the fix is quite easy to get you back on track, as the tools are gonna stay in 2.x: You'd generate the files, then grep over those with the names that cannot (obviously) parse in PHP and rename them. The entity generator was supposed to just be giving projects a kick-start, not a fully usable set of entities, as these entities are bare data structures with little to no use. |
how does doctrine even work without those classes being generated in the doctrine format then? Isn't it a requirement? |
You just adapt the generated code. Doctrine works just fine as long as the annotations or XML |
Running the command for a postgres database project with multiple schemas
creates php class entities in the format of "Schemaname.tableName" like this
which is obviously an invalid class name.
Shouldn't doctrine be putting the schema into the namespace instead of breaking the class name?
The text was updated successfully, but these errors were encountered: