/**
  * Validates the identifier mapping.
  *
  * @param ClassMetadata $class
  *
  * @throws MappingException When mapping does not have identifier
  */
 protected function validateIdentifier(ClassMetadata $class)
 {
     if (!$class->hasIdentifier()) {
         throw MappingException::identifierRequired($class->getName());
     }
 }