Summary
When updating a document with polymorphic type TDocument and known sub type TSubType using an ObjectUpdateDefinition the type discriminator is lost.
Version: C# Driver: 2.17.1
How to Reproduce
- Use FindOneAndUpdateAsync on a document with polymorphic type using an _ObjectUpdateDefinition_
Additional Background
The Render method of ObjectUpdateDefinition<T> resolved the serializer from the type of the object but ignores the documentSerializer which should be used. Thus, the serializer of the TSubType is picked which does not add the type discriminator.