First Experience with Doctrine and a strange bug #6522

Closed
opened 2026-01-22 15:34:28 +01:00 by admin · 3 comments
Owner

Originally created by @pavrip on GitHub (Aug 17, 2020).

I am just learning Doctrine with Symfony 5 for the first time and have encountered a strange bug.
I have just created an entity class, I dont want to migrate as the table already exists.

I am following a basic camelCase convention and the entity has been created fine,

Some how when I try to get the entity manager to get all it says unknown column,

So for example I have created a column as commonName, and an exception is being thrown by Symfony saying unknown column common_name, how on earth is this possible?

Originally created by @pavrip on GitHub (Aug 17, 2020). I am just learning Doctrine with Symfony 5 for the first time and have encountered a strange bug. I have just created an entity class, I dont want to migrate as the table already exists. I am following a basic camelCase convention and the entity has been created fine, Some how when I try to get the entity manager to get all it says unknown column, So for example I have created a column as commonName, and an exception is being thrown by Symfony saying unknown column common_name, how on earth is this possible?
admin closed this issue 2026-01-22 15:34:28 +01:00
Author
Owner

@pavrip commented on GitHub (Aug 17, 2020):

This is a terrible developer experience and a waste of time. I now have to create a class with a naming state

@pavrip commented on GitHub (Aug 17, 2020): This is a terrible developer experience and a waste of time. I now have to create a class with a naming state
Author
Owner

@pavrip commented on GitHub (Aug 17, 2020):

Im trying to close this issue as Its not a bug but just seems like a very awkward hurdle for no reason.
Why is there a hard coded naming strategy?
Isn't it simpler to just assume that the entity names will match the column names?
Now I have no idea and the documentation is fantastic but misses simple information,
Now Im banging my head against the Wall trying to get something as simple as a query to work but it fails because there is a rigid naming convention, and now I have to figure out how to tell Doctrine something as simple as the names of the columns match the database

@pavrip commented on GitHub (Aug 17, 2020): Im trying to close this issue as Its not a bug but just seems like a very awkward hurdle for no reason. Why is there a hard coded naming strategy? Isn't it simpler to just assume that the entity names will match the column names? Now I have no idea and the documentation is fantastic but misses simple information, Now Im banging my head against the Wall trying to get something as simple as a query to work but it fails because there is a rigid naming convention, and now I have to figure out how to tell Doctrine something as simple as the names of the columns match the database
Author
Owner

@greg0ire commented on GitHub (Aug 18, 2020):

Hi, we try to keep Github issues for bug reports and feature requests only. If you have a question, please ask it on Stack Overflow or in one of the channels mentioned at https://www.doctrine-project.org/community/index.html

@greg0ire commented on GitHub (Aug 18, 2020): Hi, we try to keep Github issues for bug reports and feature requests only. If you have a question, please ask it on Stack Overflow or in one of the channels mentioned at https://www.doctrine-project.org/community/index.html
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6522