[DDC-561] Fixed.
This commit is contained in:
parent
47ebbb4312
commit
db2be55e27
@ -356,7 +356,8 @@ abstract class AssociationMapping
|
||||
$serialized = array(
|
||||
'sourceEntityName',
|
||||
'targetEntityName',
|
||||
'sourceFieldName'
|
||||
'sourceFieldName',
|
||||
'fetchMode'
|
||||
);
|
||||
|
||||
if ($this->isCascadeDetach) {
|
||||
|
@ -286,6 +286,7 @@ class ClassMetadata extends ClassMetadataInfo
|
||||
'identifier',
|
||||
'isIdentifierComposite', // TODO: REMOVE
|
||||
'name',
|
||||
'namespace', // TODO: REMOVE
|
||||
'table',
|
||||
'rootEntityName',
|
||||
'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);
|
||||
}
|
||||
|
||||
// Evaluate DoctrineTable annotation
|
||||
// Evaluate Table annotation
|
||||
if (isset($classAnnotations['Doctrine\ORM\Mapping\Table'])) {
|
||||
$tableAnnot = $classAnnotations['Doctrine\ORM\Mapping\Table'];
|
||||
$primaryTable = array(
|
||||
|
@ -359,7 +359,7 @@ final class PersistentCollection implements Collection
|
||||
$this->_em->getUnitOfWork()->scheduleOrphanRemoval($removed);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $removed;
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
|
||||
|
||||
// Check state
|
||||
$this->assertTrue(count($cm->getReflectionProperties()) > 0);
|
||||
$this->assertEquals('Doctrine\Tests\Models\CMS', $cm->namespace);
|
||||
$this->assertTrue($cm->reflClass instanceof \ReflectionClass);
|
||||
$this->assertEquals('Doctrine\Tests\Models\CMS\CmsUser', $cm->name);
|
||||
$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->assertEquals(1, count($cm->associationMappings));
|
||||
$oneOneMapping = $cm->getAssociationMapping('phonenumbers');
|
||||
$this->assertTrue($oneOneMapping->fetchMode == \Doctrine\ORM\Mapping\AssociationMapping::FETCH_LAZY);
|
||||
$this->assertEquals('phonenumbers', $oneOneMapping->sourceFieldName);
|
||||
$this->assertEquals('Doctrine\Tests\Models\CMS\Bar', $oneOneMapping->targetEntityName);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user