Skip to content

Loading…

DDC-603: $metadata->name classify can lead to all caps #5111

Closed
doctrinebot opened this Issue · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user ss10sb:

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:

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.

@doctrinebot

Comment created by @beberlei:

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

@doctrinebot

Issue was closed with resolution "Fixed"

@jwage jwage was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0-BETA2 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.