0

I'm investigating an issue related to :

  • Doctrine 2.* on Symfony2 2.3 LTS with a MySQL server (5.1.73 and 5.7.9)

Objects created in the database (Schema and entities) don't reflect the same casing as define in the Entities and parameters file. i.e: database_name: TestDB will create 'testdb' instead of 'TestDB' i.e:\....Bundle\Entity\Test: type: entity table: Test will create an entity (table) 'test' instead of 'Test', this both while using YML or Annotations. Thereby , causing PDO Exception of table not found. Is there a way to making sure that database object naming respect the ones defined into the project?

Raymond A
  • 763
  • 1
  • 12
  • 29
  • Try reformat everything (database name, table name, columns, indexes, etc) to underscore (lowercase with underscores). It might not allow you to name things that way you want but it stops most naming issues... apart from reserved words. – qooplmao Jan 08 '16 at 18:11
  • 1
    Maybe the issue is MySQL not Doctrine? See http://dev.mysql.com/doc/refman/5.1/en/identifier-case-sensitivity.html – craigh Jan 08 '16 at 22:32

1 Answers1

0

Based on the documentation provided by craigh, i changed the setting of the lower_case_table_names = 2. This will allow the lookup to transform the lookup to lowercase while respecting the Create Statement Casing.

Below are supporting questions related to the same issue:

Community
  • 1
  • 1
Raymond A
  • 763
  • 1
  • 12
  • 29