Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
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.
This is a good fix for another issue a friend of mine had when using the DatabaseDriver with Oracle. I think it can work.