-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: 3.0.0
-
Component/s: Linq, Serialization
-
None
-
Dotnet Drivers
Currently `OfType` and `is` only work with the `HiearchicalDiscriminatorConvention`.
This is because with hierarchical discriminators the `_t` value lists all of the classes in the class hierarchy, which makes it possible to write MQL queries for `OfType` and `is`.
To support an `OfType` or `is` query in MQL requires a different query which lists all of the known subtypes in the query itself (rather than relying on them being stored in the `_t` field). This in turn requires that the `ScalarDiscriminatorConvention` implement the new `IScalarDiscriminatorConvention` interface ` and in particular the `GetDiscriminatorsForTypeAndSubTypes` method.
- is depended on by
-
CSHARP-4040 Serialization ignores discriminator field when checking for duplicate field names
- Blocked
- is duplicated by
-
CSHARP-5344 "is" operator throwing error after upgrade to MongoDB.Driver 3.0
- Closed
-
CSHARP-5353 OfType is not supported with the configured discriminator convention exception
- Closed
-
CSHARP-5422 Querying polymorphic type causes NotSupportedException
- Closed