1
0
mirror of synced 2025-03-05 04:13:20 +03:00

Fix bug introduced in recent XmlDriver commit

This commit is contained in:
Benjamin Eberlei 2011-11-15 20:03:13 +01:00
parent 14f20c16bc
commit a0ee72f264
2 changed files with 48 additions and 47 deletions

View File

@ -225,7 +225,7 @@ class XmlDriver extends AbstractFileDriver
'fieldName' => (string)$idElement['name'] 'fieldName' => (string)$idElement['name']
); );
if (isset($fieldMapping['type'])) { if (isset($idElement['type'])) {
$mapping['type'] = (string)$idElement['type']; $mapping['type'] = (string)$idElement['type'];
} }

View File

@ -138,6 +138,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
public function testIdentifier($class) public function testIdentifier($class)
{ {
$this->assertEquals(array('id'), $class->identifier); $this->assertEquals(array('id'), $class->identifier);
$this->assertEquals('integer', $class->fieldMappings['id']['type']);
$this->assertEquals(ClassMetadata::GENERATOR_TYPE_AUTO, $class->generatorType, "ID-Generator is not ClassMetadata::GENERATOR_TYPE_AUTO"); $this->assertEquals(ClassMetadata::GENERATOR_TYPE_AUTO, $class->generatorType, "ID-Generator is not ClassMetadata::GENERATOR_TYPE_AUTO");
return $class; return $class;