DDC-787: Camelcase tablename lost when creating models based on the database #970

Closed
opened 2026-01-22 12:57:39 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 3, 2010).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user tbo:

I have a table articleLocale and I created the model with the doctrine tool using the following command: # doctrine orm:convert-mapping --from-database annotation temp.

The model that was created was Articlelocale instead of ArticleLocale and the annotations were wrong.

/****
 * Articlelocale
 *
 * @Table(name="articlelocale")
 * @Entity
 */
class Articlelocale
{
//....
}

When trying to fetch some data, I get the following error: Message: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'doctrine.articlelocale' doesn't exist
If i change the annotation so that it reads articleLocale instead of articlelocale it works like it should be working.

/****
 * Articlelocale
 *
 * @Table(name="articleLocale")
 * @Entity
 */
class Articlelocale
{
//....
}

So there is a problem with camelCase table names.

Originally created by @doctrinebot on GitHub (Sep 3, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user tbo: I have a table articleLocale and I created the model with the doctrine tool using the following command: # doctrine orm:convert-mapping --from-database annotation temp. The model that was created was Articlelocale instead of ArticleLocale and the annotations were wrong. ``` <?php /**** * Articlelocale * * @Table(name="articlelocale") * @Entity */ class Articlelocale { //.... } ``` When trying to fetch some data, I get the following error: Message: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'doctrine.articlelocale' doesn't exist If i change the annotation so that it reads articleLocale instead of articlelocale it works like it should be working. ``` <?php /**** * Articlelocale * * @Table(name="articleLocale") * @Entity */ class Articlelocale { //.... } ``` So there is a problem with camelCase table names.
admin added the Bug label 2026-01-22 12:57:39 +01:00
admin closed this issue 2026-01-22 12:57:41 +01:00
Author
Owner

@doctrinebot commented on GitHub (Oct 30, 2010):

Comment created by @beberlei:

Fixed

@doctrinebot commented on GitHub (Oct 30, 2010): Comment created by @beberlei: Fixed
Author
Owner

@doctrinebot commented on GitHub (Oct 30, 2010):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Oct 30, 2010): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#970