@@ 132-134 (lines=3) @@ | ||
129 | throw MetadataException::invalidMetadata($metadata->type, sprintf('Child class types must be prefixed by the parent class. Expected "%s" prefix.', $parentType)); |
|
130 | } |
|
131 | } |
|
132 | if (false === $this->isEntityTypeValid($metadata->type)) { |
|
133 | throw MetadataException::invalidMetadata($metadata->type, sprintf('The entity type is invalid based on the configured name format "%s"', $this->config->getEntityFormat())); |
|
134 | } |
|
135 | return true; |
|
136 | } |
|
137 | ||
@@ 151-153 (lines=3) @@ | ||
148 | if (true === $metadata->isPolymorphic()) { |
|
149 | foreach ($metadata->ownedTypes as $child) { |
|
150 | ||
151 | if (false === $this->isEntityTypeValid($child)) { |
|
152 | throw MetadataException::invalidMetadata($metadata->type, sprintf('The owned entity type "%s" is invalid based on the configured name format "%s"', $child, $this->config->getEntityFormat())); |
|
153 | } |
|
154 | ||
155 | if (false === $mf->metadataExists($child)) { |
|
156 | throw MetadataException::invalidMetadata($metadata->type, sprintf('The entity owns a type "%s" that does not exist.', $child)); |
|
@@ 269-271 (lines=3) @@ | ||
266 | throw MetadataException::invalidMetadata($metadata->type, sprintf('Parent entity type "%s" already contains relationship field "%s"', $parent->type, $relationship->key)); |
|
267 | } |
|
268 | } |
|
269 | if (false === $this->isEntityTypeValid($relationship->entityType)) { |
|
270 | throw MetadataException::invalidMetadata($metadata->type, sprintf('The related model "%s" for relationship "%s" is invalid based on the configured name format "%s"', $relationship->entityType, $relationship->key, $this->config->getEntityFormat())); |
|
271 | } |
|
272 | if (false === $mf->metadataExists($relationship->entityType)) { |
|
273 | throw MetadataException::invalidMetadata($metadata->type, sprintf('The related model "%s" for relationship "%s" does not exist.', $relationship->entityType, $relationship->key)); |
|
274 | } |