console orm:convert-mapping case sensitive fields #6138

Closed
opened 2026-01-22 15:27:29 +01:00 by admin · 1 comment
Owner

Originally created by @ghost on GitHub (Dec 16, 2018).

Originally assigned to: @Ocramius on GitHub.

Hi,

I'm trying to generate entities from my database with the console and orm:convert-mapping command.
Here is the command I'm using:

php vendor/doctrine/orm/bin/doctrine.php orm:convert-mapping --from-database annotation ./src/Entities

The problem is that the generated fields in my entities classes are not case sensitive.
For example, I have a validationCode field in a table in my database and the generated field in the corresponding entity is :

    /**
     * @var string|null
     *
     * @ORM\Column(name="validationCode", type="string", length=16, nullable=true)
     */
    private $validationcode;

and I would like to have :

    /**
     * @var string|null
     *
     * @ORM\Column(name="validationCode", type="string", length=16, nullable=true)
     */
    private $validationCode; // HERE validationCode with an uppercase C

How can I do that using the command-line? thank you

Originally created by @ghost on GitHub (Dec 16, 2018). Originally assigned to: @Ocramius on GitHub. Hi, I'm trying to generate entities from my database with the console and orm:convert-mapping command. Here is the command I'm using: `php vendor/doctrine/orm/bin/doctrine.php orm:convert-mapping --from-database annotation ./src/Entities` The problem is that the generated fields in my entities classes are not case sensitive. For example, I have a validationCode field in a table in my database and the generated field in the corresponding entity is : ``` /** * @var string|null * * @ORM\Column(name="validationCode", type="string", length=16, nullable=true) */ private $validationcode; ``` and I would like to have : ``` /** * @var string|null * * @ORM\Column(name="validationCode", type="string", length=16, nullable=true) */ private $validationCode; // HERE validationCode with an uppercase C ``` How can I do that using the command-line? thank you
admin added the New FeatureWon't FixQuestion labels 2026-01-22 15:27:29 +01:00
admin closed this issue 2026-01-22 15:27:29 +01:00
Author
Owner

@Ocramius commented on GitHub (Dec 16, 2018):

@yzobairi entity generators were deprecated and are no longer present in master, nor will be improved further on. If you need this to import a legacy schema, I suggest debugging and hacking a fix into your own version until you need it, then forgetting about that CLI command entirely.

Closing as won't fix here.

See also https://github.com/doctrine/doctrine2/pull/6870

@Ocramius commented on GitHub (Dec 16, 2018): @yzobairi entity generators were deprecated and are no longer present in `master`, nor will be improved further on. If you need this to import a legacy schema, I suggest debugging and hacking a fix into your own version until you need it, then forgetting about that CLI command entirely. Closing as `won't fix` here. See also https://github.com/doctrine/doctrine2/pull/6870
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6138