@@ 155-157 (lines=3) @@ | ||
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)); |
|
157 | } |
|
158 | } |
|
159 | } |
|
160 | ||
@@ 175-177 (lines=3) @@ | ||
172 | throw MetadataException::invalidMetadata($metadata->type, 'An entity cannot extend itself.'); |
|
173 | } |
|
174 | ||
175 | if (false === $mf->metadataExists($metadata->extends)) { |
|
176 | throw MetadataException::invalidMetadata($metadata->type, sprintf('The parent entity type "%s" does not exist.', $metadata->extends)); |
|
177 | } |
|
178 | ||
179 | $parent = $mf->getMetadataForType($metadata->extends); |
|
180 | if (false === $parent->isPolymorphic()) { |