Explicitely state what the problem is
People like me think the problem is that there is no association mapping, when the problem in fact could be that there also is a field mapping on the property. This message makes it clearer why we are getting an error message.
This commit is contained in:
parent
4e8b787d07
commit
a986fe013e
@ -115,7 +115,7 @@ class SchemaValidator
|
||||
if ($assoc['mappedBy']) {
|
||||
if ($targetMetadata->hasField($assoc['mappedBy'])) {
|
||||
$ce[] = "The association " . $class->name . "#" . $fieldName . " refers to the owning side ".
|
||||
"field " . $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " which is not defined as association.";
|
||||
"field " . $assoc['targetEntity'] . "#" . $assoc['mappedBy'] . " which is not defined as association, but as field.";
|
||||
}
|
||||
if (!$targetMetadata->hasAssociation($assoc['mappedBy'])) {
|
||||
$ce[] = "The association " . $class->name . "#" . $fieldName . " refers to the owning side ".
|
||||
|
Loading…
Reference in New Issue
Block a user