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