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

DDC-515 - Fixed a notice occuring in certain scenarios of the new Validate Schema Tool

This commit is contained in:
Benjamin Eberlei 2010-05-11 23:12:26 +02:00
parent d00f674a08
commit 57cd2e01bb

View File

@ -117,7 +117,8 @@ class SchemaValidator
"field " . $assoc->targetEntityName . "#" . $assoc->inversedBy . " which does not exist.";
}
if ($targetMetadata->associationMappings[$assoc->mappedBy]->mappedBy == null) {
if (isset($targetMetadata->associationMappings[$assoc->mappedBy]) &&
$targetMetadata->associationMappings[$assoc->mappedBy]->mappedBy == null) {
$ce[] = "The field " . $class->name . "#" . $fieldName . " is on the inverse side of a ".
"bi-directional relationship, but the specified mappedBy association on the target-entity ".
$assoc->targetEntityName . "#" . $assoc->mappedBy . " does not contain the required ".