/**
  * {@inheritdoc}
  */
 public function merge(AttributeMetadataInterface $attributeMetadata)
 {
     foreach ($attributeMetadata->getGroups() as $group) {
         $this->addGroup($group);
     }
     // Overwrite only if not defined
     if (null === $this->maxDepth) {
         $this->maxDepth = $attributeMetadata->getMaxDepth();
     }
 }
 /**
  * {@inheritdoc}
  */
 public function merge(AttributeMetadataInterface $attributeMetadata)
 {
     foreach ($attributeMetadata->getGroups() as $group) {
         $this->addGroup($group);
     }
 }