Is this really changing the behavior at all? Since you're providing an abbreviated mapping to `getClassNameFromDiscriminatorValue()` with only the `targetDocument` class, the following logic will occur in that method:

```
$class = $this->getClassMetadata($mapping['targetDocument']);

if ($class->discriminatorField && isset($value[$class->discriminatorField['name']])) {
    return $class->discriminatorMap[$value[$class->discriminatorField['name']]];
}

return $mapping['targetDocument'];
```

This seems identical to the current behavior in `getOrCreateDocument()`. By the end, we end up with ClassMetadata for the class name matching the discriminator, if there is one. Otherwise, we default to metadata for the original class name provided.