diff --git a/lib/Doctrine/ORM/Tools/SchemaValidator.php b/lib/Doctrine/ORM/Tools/SchemaValidator.php index 0e1f80cdf..c8f41bc07 100644 --- a/lib/Doctrine/ORM/Tools/SchemaValidator.php +++ b/lib/Doctrine/ORM/Tools/SchemaValidator.php @@ -245,28 +245,6 @@ class SchemaValidator return $ce; } - /** - * @param string $columnName - * @param ClassMetadataInfo $class - * @return bool - */ - private function columnExistsOnEntity($columnName, $class) - { - if (isset($class->fieldNames[$columnName])) { - return true; - } - foreach ($class->associationMappings as $assoc) { - if ($assoc['isOwningSide']) { - foreach ($assoc['joinColumns'] as $columnMapping) { - if ($columnMapping['name'] == $columnName) { - return true; - } - } - } - } - return false; - } - /** * Check if the Database Schema is in sync with the current metadata state. * diff --git a/tests/Doctrine/Tests/ORM/Tools/SchemaValidatorTest.php b/tests/Doctrine/Tests/ORM/Tools/SchemaValidatorTest.php index 1d68a9bcb..7b77fe507 100644 --- a/tests/Doctrine/Tests/ORM/Tools/SchemaValidatorTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/SchemaValidatorTest.php @@ -103,8 +103,8 @@ class SchemaValidatorTest extends \Doctrine\Tests\OrmTestCase $this->assertEquals( array( - "The referenced column name 'id' does not have a corresponding field with this column name on the class 'Doctrine\Tests\ORM\Tools\InvalidEntity1'.", - "The join columns of the association 'assoc' have to match to ALL identifier columns of the source entity 'Doctrine\Tests\ORM\Tools\InvalidEntity2', however 'key3, key4' are missing." + "The referenced column name 'id' has to be a primary key column on the target entity class 'Doctrine\Tests\ORM\Tools\InvalidEntity1'.", + "The join columns of the association 'assoc' have to match to ALL identifier columns of the target entity 'Doctrine\Tests\ORM\Tools\InvalidEntity2', however 'key1, key2' are missing." ), $ce );