[DDC-1601] Fix failing test and remove unused code
This commit is contained in:
parent
6ffe4d3dda
commit
9950af2f58
2 changed files with 2 additions and 24 deletions
|
@ -245,28 +245,6 @@ class SchemaValidator
|
||||||
return $ce;
|
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.
|
* Check if the Database Schema is in sync with the current metadata state.
|
||||||
*
|
*
|
||||||
|
|
|
@ -103,8 +103,8 @@ class SchemaValidatorTest extends \Doctrine\Tests\OrmTestCase
|
||||||
|
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
array(
|
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 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 source entity 'Doctrine\Tests\ORM\Tools\InvalidEntity2', however 'key3, key4' are missing."
|
"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
|
$ce
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue