Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-603

$metadata->name classify can lead to all caps

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA1
    • Fix Version/s: 2.0-BETA2
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:
      None

      Description

      While I was messing around creating some XML and Entities from an existing database, I noticed the $metadata->name of the table comes across as ALLCAPS if the table in question is ALL_CAPS.
      Temp/easy fix:

      \Doctrine\ORM\Mapping\DatabaseDriver
      public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
      {
          $tableName = $className;
       -  $className = Inflector::classify($tableName);
       +  $className = Inflector::classify(strtolower($tableName));
      ...
      

      I'm not sure if anything else will be affected, but it makes for easier reading and less of a need for caps lock when using those entities.

        Activity

        Hide
        Benjamin Eberlei added a comment -

        This is a good fix for another issue a friend of mine had when using the DatabaseDriver with Oracle. I think it can work.

        Show
        Benjamin Eberlei added a comment - This is a good fix for another issue a friend of mine had when using the DatabaseDriver with Oracle. I think it can work.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Scott Morken
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: