From 57cd2e01bb8b15436f7fc83c2ba8b66c21518ef4 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Tue, 11 May 2010 23:12:26 +0200 Subject: [PATCH] DDC-515 - Fixed a notice occuring in certain scenarios of the new Validate Schema Tool --- lib/Doctrine/ORM/Tools/SchemaValidator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/SchemaValidator.php b/lib/Doctrine/ORM/Tools/SchemaValidator.php index 12f51f1ce..aae4d37d8 100644 --- a/lib/Doctrine/ORM/Tools/SchemaValidator.php +++ b/lib/Doctrine/ORM/Tools/SchemaValidator.php @@ -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 ".