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

DDC-596 - Added validation of inheritance hierachies

This commit is contained in:
Benjamin Eberlei 2010-07-10 09:13:02 +02:00
parent aa6edb7903
commit c0d26b97dd

View File

@ -178,7 +178,15 @@ class SchemaValidator
if ($publicAttr->isStatic()) {
continue;
}
$ce[] = "Field '".$publicAttr->getName()."' in class '".$class->name."' must be private or protected. Public fields break lazy-loading.";
$ce[] = "Field '".$publicAttr->getName()."' in class '".$class->name."' must be private ".
"or protected. Public fields may break lazy-loading.";
}
foreach ($class->subClasses AS $subClass) {
if (!in_array($class->name, class_parents($subClass))) {
$ce[] = "According to the discriminator map class '" . $subClass . "' has to be a child ".
"of '" . $class->name . "' but these entities are not related through inheritance.";
}
}
if ($ce) {