when saving an object, we need to support the serialization of subclasses and their hydration regardless of the field type declaration. e.g.
List<Person> might hold Person, an Manager, or a Contractor. The code will need be able to apply the correct Codec to and from the database.
A discriminator value would be added to the saved document. With the Conventions system in place, how this is defined could configurable.
The C# driver uses an array of discriminator values to support subclasses and polymorphia queries:
For example:
{ _t : [ "Animal", "Mammal", "Cow" ], ... }
This form of discriminator is very useful for querying on types in the middle of the inheritance hierarchy:
db.animals.find({ _t : "Mammal" });