Commit db2be55e authored by Roman S. Borschel's avatar Roman S. Borschel

[DDC-561] Fixed.

parent 47ebbb43
...@@ -356,7 +356,8 @@ abstract class AssociationMapping ...@@ -356,7 +356,8 @@ abstract class AssociationMapping
$serialized = array( $serialized = array(
'sourceEntityName', 'sourceEntityName',
'targetEntityName', 'targetEntityName',
'sourceFieldName' 'sourceFieldName',
'fetchMode'
); );
if ($this->isCascadeDetach) { if ($this->isCascadeDetach) {
......
...@@ -286,6 +286,7 @@ class ClassMetadata extends ClassMetadataInfo ...@@ -286,6 +286,7 @@ class ClassMetadata extends ClassMetadataInfo
'identifier', 'identifier',
'isIdentifierComposite', // TODO: REMOVE 'isIdentifierComposite', // TODO: REMOVE
'name', 'name',
'namespace', // TODO: REMOVE
'table', 'table',
'rootEntityName', 'rootEntityName',
'idGenerator', //TODO: Does not really need to be serialized. Could be moved to runtime. 'idGenerator', //TODO: Does not really need to be serialized. Could be moved to runtime.
......
...@@ -143,7 +143,7 @@ class AnnotationDriver implements Driver ...@@ -143,7 +143,7 @@ class AnnotationDriver implements Driver
throw MappingException::classIsNotAValidEntityOrMappedSuperClass($className); throw MappingException::classIsNotAValidEntityOrMappedSuperClass($className);
} }
// Evaluate DoctrineTable annotation // Evaluate Table annotation
if (isset($classAnnotations['Doctrine\ORM\Mapping\Table'])) { if (isset($classAnnotations['Doctrine\ORM\Mapping\Table'])) {
$tableAnnot = $classAnnotations['Doctrine\ORM\Mapping\Table']; $tableAnnot = $classAnnotations['Doctrine\ORM\Mapping\Table'];
$primaryTable = array( $primaryTable = array(
......
...@@ -37,6 +37,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase ...@@ -37,6 +37,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
// Check state // Check state
$this->assertTrue(count($cm->getReflectionProperties()) > 0); $this->assertTrue(count($cm->getReflectionProperties()) > 0);
$this->assertEquals('Doctrine\Tests\Models\CMS', $cm->namespace);
$this->assertTrue($cm->reflClass instanceof \ReflectionClass); $this->assertTrue($cm->reflClass instanceof \ReflectionClass);
$this->assertEquals('Doctrine\Tests\Models\CMS\CmsUser', $cm->name); $this->assertEquals('Doctrine\Tests\Models\CMS\CmsUser', $cm->name);
$this->assertEquals('UserParent', $cm->rootEntityName); $this->assertEquals('UserParent', $cm->rootEntityName);
...@@ -47,6 +48,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase ...@@ -47,6 +48,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
$this->assertTrue($cm->getAssociationMapping('phonenumbers') instanceof \Doctrine\ORM\Mapping\OneToOneMapping); $this->assertTrue($cm->getAssociationMapping('phonenumbers') instanceof \Doctrine\ORM\Mapping\OneToOneMapping);
$this->assertEquals(1, count($cm->associationMappings)); $this->assertEquals(1, count($cm->associationMappings));
$oneOneMapping = $cm->getAssociationMapping('phonenumbers'); $oneOneMapping = $cm->getAssociationMapping('phonenumbers');
$this->assertTrue($oneOneMapping->fetchMode == \Doctrine\ORM\Mapping\AssociationMapping::FETCH_LAZY);
$this->assertEquals('phonenumbers', $oneOneMapping->sourceFieldName); $this->assertEquals('phonenumbers', $oneOneMapping->sourceFieldName);
$this->assertEquals('Doctrine\Tests\Models\CMS\Bar', $oneOneMapping->targetEntityName); $this->assertEquals('Doctrine\Tests\Models\CMS\Bar', $oneOneMapping->targetEntityName);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment