@@ 203-205 (lines=3) @@ | ||
200 | throw MetadataException::invalidMetadata($type, sprintf('Attribute key mismtach. "%s" !== "%s"', $key, $attribute->key)); |
|
201 | } |
|
202 | ||
203 | if (false === $this->isFieldKeyValid($attribute->key)) { |
|
204 | throw MetadataException::invalidMetadata($type, sprintf('The attribute key "%s" is invalid based on the configured name format "%s"', $attribute->key, $this->config->getFieldKeyFormat())); |
|
205 | } |
|
206 | ||
207 | if (false === $this->typeFactory->hasType($attribute->dataType)) { |
|
208 | throw MetadataException::invalidMetadata($type, sprintf('The data type "%s" for attribute "%s" is invalid', $attribute->dataType, $attribute->key)); |
|
@@ 257-259 (lines=3) @@ | ||
254 | if ($key != $relationship->key) { |
|
255 | throw MetadataException::invalidMetadata($metadata->type, sprintf('Relationship key mismtach. "%s" !== "%s"', $key, $relationship->key)); |
|
256 | } |
|
257 | if (false === $this->isFieldKeyValid($relationship->key)) { |
|
258 | throw MetadataException::invalidMetadata($metadata->type, sprintf('The relationship key "%s" is invalid based on the configured name format "%s"', $relationship->key, $this->config->getFieldKeyFormat())); |
|
259 | } |
|
260 | if (true === $metadata->isChildEntity()) { |
|
261 | $parent = $mf->getMetadataForType($metadata->extends); |
|
262 | if ($parent->hasRelationship($relationship->key)) { |