1
0
mirror of synced 2025-01-20 15:31:40 +03:00

Merge pull request #737 from Koc/fix-schema-validator-master

Skip not mapped public properties in SchemaValidator
This commit is contained in:
Benjamin Eberlei 2013-08-10 07:27:45 -07:00
commit 95af021ed9

View File

@ -241,6 +241,11 @@ class SchemaValidator
continue; continue;
} }
if ( ! isset($class->fieldMappings[$publicAttr->getName()]) &&
! isset($class->associationMappings[$publicAttr->getName()])) {
continue;
}
$ce[] = "Field '".$publicAttr->getName()."' in class '".$class->name."' must be private ". $ce[] = "Field '".$publicAttr->getName()."' in class '".$class->name."' must be private ".
"or protected. Public fields may break lazy-loading."; "or protected. Public fields may break lazy-loading.";
} }