Skip to content

Loading…

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

Closed
doctrinebot opened this Issue · 2 comments

2 participants

@doctrinebot

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.

@doctrinebot

Comment created by @beberlei:

Fixed

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0-RC1 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.