Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 protected function validateEmbed(EmbeddedPropMetadata $embed)
 {
     if (true === $this->hasAttribute($embed->getKey())) {
         throw MetadataException::fieldKeyInUse('embed', 'attribute', $embed->getKey(), $this->name);
     }
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function validateRelationship(RelationshipMetadata $relationship)
 {
     if (true === $this->hasAttribute($relationship->getKey())) {
         throw MetadataException::fieldKeyInUse('relationship', 'attribute', $relationship->getKey(), $this->name);
     }
     if (true === $this->hasEmbed($relationship->getKey())) {
         throw MetadataException::fieldKeyInUse('relationship', 'embed', $relationship->getKey(), $this->name);
     }
 }