private function completeIdGeneratorMapping(ClassMetadata $class)
 {
     $idGenType = $class->generatorType;
     $idGenOptions = $class->generatorOptions;
     switch ($class->generatorType) {
         case ClassMetadata::GENERATOR_TYPE_AUTO:
             $class->setIdGenerator(new \Doctrine\ODM\MongoDB\Id\AutoGenerator($class));
             break;
         case ClassMetadata::GENERATOR_TYPE_INCREMENT:
             $class->setIdGenerator(new \Doctrine\ODM\MongoDB\Id\IncrementGenerator($class));
             break;
         case ClassMetadata::GENERATOR_TYPE_UUID:
             $uuidGenerator = new \Doctrine\ODM\MongoDB\Id\UuidGenerator($class);
             $uuidGenerator->setSalt(isset($idGenOptions['salt']) ? $idGenOptions['salt'] : php_uname('n'));
             $class->setIdGenerator($uuidGenerator);
             break;
         case ClassMetadata::GENERATOR_TYPE_NONE:
             break;
         default:
             throw new MongoDBException("Unknown generator type: " . $class->generatorType);
     }
 }