Java Record supports for interface implementation.
Let say i have interface A
record B implements A
record C implements A
Let say i have some type of collection like this: List<A>
This list permit me to add B and C types of objects.
The problem is when you try to convert this list to BSON using RecordCodec
It throws Not supporting exception for BsonDiscriminator.
BsonDiscriminator supporting records is essential for this situation otherwise it is requiring to manually implement this solution...