LTME
LTME

Reputation: 1126

Doctrine case sensitivity in schema.yml

Doctrine turns my column names into all lower case to improve compatibility. How do I prevent this from happening?

users:
  actAs: [Timestampable]
  columns:
    userId:
      type: integer
      length: 4
      primary: true
      autoincrement: true

or

$this->hasColumn('userId', 'integer', 4, array(
         'type' => 'integer',
         'length' => 4,
         'primary' => true,
         'autoincrement' => true,
         ));

then becomes

userid

This is a problem because I have lots of existing code and data that uses the camelCase convention. Is there some sort of easy boolean I can change to make it keep my columns exactly as written?

Upvotes: 1

Views: 635

Answers (1)

Jim
Jim

Reputation: 18863

The Yaml conversion is where the issue lies. To fix this you need to alias the column name in the YAML schema file IE: name: user_id as userId

Upvotes: 2

Related Questions