@@ 129-131 (lines=3) @@ | ||
126 | throw MetadataException::invalidMetadata($metadata->type, sprintf('Child class types must be prefixed by the parent class. Expected "%s" prefix.', $parentType)); |
|
127 | } |
|
128 | } |
|
129 | if (false === $this->isEntityTypeValid($metadata->type)) { |
|
130 | throw MetadataException::invalidMetadata($metadata->type, sprintf('The entity type is invalid based on the configured name format "%s"', $this->config->getEntityFormat())); |
|
131 | } |
|
132 | return true; |
|
133 | } |
|
134 | ||
@@ 148-150 (lines=3) @@ | ||
145 | if (true === $metadata->isPolymorphic()) { |
|
146 | foreach ($metadata->ownedTypes as $child) { |
|
147 | ||
148 | if (false === $this->isEntityTypeValid($child)) { |
|
149 | throw MetadataException::invalidMetadata($metadata->type, sprintf('The owned entity type "%s" is invalid based on the configured name format "%s"', $child, $this->config->getEntityFormat())); |
|
150 | } |
|
151 | ||
152 | if (false === $mf->metadataExists($child)) { |
|
153 | throw MetadataException::invalidMetadata($metadata->type, sprintf('The entity owns a type "%s" that does not exist.', $child)); |
|
@@ 245-247 (lines=3) @@ | ||
242 | throw MetadataException::invalidMetadata($metadata->type, sprintf('Parent entity type "%s" already contains relationship field "%s"', $parent->type, $relationship->key)); |
|
243 | } |
|
244 | } |
|
245 | if (false === $this->isEntityTypeValid($relationship->entityType)) { |
|
246 | 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())); |
|
247 | } |
|
248 | if (false === $mf->metadataExists($relationship->entityType)) { |
|
249 | throw MetadataException::invalidMetadata($metadata->type, sprintf('The related model "%s" for relationship "%s" does not exist.', $relationship->entityType, $relationship->key)); |
|
250 | } |