|
@@ 198-200 (lines=3) @@
|
| 195 |
|
throw MetadataException::invalidMetadata($metadata->type, sprintf('Attribute key mismtach. "%s" !== "%s"', $key, $attribute->key)); |
| 196 |
|
} |
| 197 |
|
|
| 198 |
|
if (false === $this->isFieldKeyValid($attribute->key)) { |
| 199 |
|
throw MetadataException::invalidMetadata($metadata->type, sprintf('The attribute key "%s" is invalid based on the configured name format "%s"', $attribute->key, $this->config->getFieldKeyFormat())); |
| 200 |
|
} |
| 201 |
|
|
| 202 |
|
if (false === $this->typeFactory->hasType($attribute->dataType)) { |
| 203 |
|
throw MetadataException::invalidMetadata($metadata->type, sprintf('The data type "%s" for attribute "%s" is invalid', $attribute->dataType, $attribute->key)); |
|
@@ 236-238 (lines=3) @@
|
| 233 |
|
if ($key != $relationship->key) { |
| 234 |
|
throw MetadataException::invalidMetadata($metadata->type, sprintf('Relationship key mismtach. "%s" !== "%s"', $key, $relationship->key)); |
| 235 |
|
} |
| 236 |
|
if (false === $this->isFieldKeyValid($relationship->key)) { |
| 237 |
|
throw MetadataException::invalidMetadata($metadata->type, sprintf('The relationship key "%s" is invalid based on the configured name format "%s"', $relationship->key, $this->config->getFieldKeyFormat())); |
| 238 |
|
} |
| 239 |
|
if (true === $metadata->isChildEntity()) { |
| 240 |
|
$parent = $mf->getMetadataForType($metadata->extends); |
| 241 |
|
if ($parent->hasRelationship($relationship->key)) { |