1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Merge branch 'DDC-965'

This commit is contained in:
Benjamin Eberlei 2011-01-02 10:24:38 +01:00
commit f3abf9a30a

View File

@ -284,10 +284,6 @@ class ClassMetadataFactory
throw MappingException::reflectionFailure($className, $e);
}
// Verify & complete identifier mapping
if ( ! $class->identifier && ! $class->isMappedSuperclass) {
throw MappingException::identifierRequired($className);
}
if ($parent && ! $parent->isMappedSuperclass) {
if ($parent->isIdGeneratorSequence()) {
$class->setSequenceGeneratorDefinition($parent->sequenceGeneratorDefinition);
@ -315,6 +311,11 @@ class ClassMetadataFactory
$this->evm->dispatchEvent(Events::loadClassMetadata, $eventArgs);
}
// Verify & complete identifier mapping
if ( ! $class->identifier && ! $class->isMappedSuperclass) {
throw MappingException::identifierRequired($className);
}
// verify inheritance
if (!$parent && !$class->isMappedSuperclass && !$class->isInheritanceTypeNone()) {
if (count($class->discriminatorMap) == 0) {