public function validateChildClasses()
    {
        if (count($this->childClasses) > 0 && $this->isLeaf) {
            throw new MappingException(sprintf(
                'Cannot map a document as a leaf and define child classes for "%s"',
                $this->name
            ));
        }
    }