Hi everyone!
I reproduced this example in my code. It works perfect.
But if I replace the abstract class with an interface, the example does not work.
I found out that the discriminator value will be different when inserting a document and searching using the OfType<>
filter.
When inserting a document, the value of the discriminator is simply the name of the class.
When using the OfType<> filter, the discriminator value becomes equal to the full class name with namespaces.
In such case, the data search query fails.
Tell me, please, why does the driver set different discriminator values when using OfType<>
filter for abstract class and interface?
Thank you for your attention,
Best regards!