[DDC-561] Fixed.
This commit is contained in:
parent
47ebbb4312
commit
db2be55e27
@ -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
|
|||||||
'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
|
|||||||
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
|
|||||||
|
|
||||||
// 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
|
|||||||
$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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user