1
0
mirror of synced 2025-01-18 22:41:43 +03:00

Revert "Fixed ClassMetadataFactory which was throwing an exception if parent class on inheritance hierarchy is an abstract class and also extends from a mapped superclass (so it contains an inheritance already), but is not in the discriminatorMap."

This reverts commit 4603e94fe990e1063f4a2d6ccc87247e3bc3935b.

Making an exception go away is not a fix for something. :)
This commit is contained in:
Benjamin Eberlei 2011-06-30 20:12:22 +02:00
parent e32e141012
commit 5362206297

View File

@ -327,7 +327,7 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface
if (!$class->discriminatorColumn) {
throw MappingException::missingDiscriminatorColumn($class->name);
}
} else if ($parent && !$class->reflClass->isAbstract() && !in_array($class->name, array_values($class->discriminatorMap))) {
} else if ($parent && !in_array($class->name, array_values($class->discriminatorMap))) {
// enforce discriminator map for all entities of an inheritance hierachy, otherwise problems will occur.
throw MappingException::mappedClassNotPartOfDiscriminatorMap($class->name, $class->rootEntityName);
}