[DDC-1068] Fix case-sensitivity problems of first loading of Metadata.
This commit is contained in:
parent
c77dbd859b
commit
ac175d2c40
@ -63,10 +63,10 @@ class ClassMetadata extends ClassMetadataInfo
|
||||
*/
|
||||
public function __construct($entityName)
|
||||
{
|
||||
parent::__construct($entityName);
|
||||
$this->reflClass = new ReflectionClass($entityName);
|
||||
$this->namespace = $this->reflClass->getNamespaceName();
|
||||
$this->table['name'] = $this->reflClass->getShortName();
|
||||
parent::__construct($this->reflClass->getName()); // do not use $entityName, possible case-problems
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -446,4 +446,14 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
|
||||
'query' => 'SELECT u FROM __CLASS__ u WHERE u.id = ?1'
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* @group DDC-1068
|
||||
*/
|
||||
public function testClassCaseSensitivity()
|
||||
{
|
||||
$user = new \Doctrine\Tests\Models\CMS\CmsUser();
|
||||
$cm = new ClassMetadata('DOCTRINE\TESTS\MODELS\CMS\CMSUSER');
|
||||
$this->assertEquals('Doctrine\Tests\Models\CMS\CmsUser', $cm->name);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user