I have the following class:
@BsonDiscriminator public abstract class InventoryItem<S extends Stored, C, W extends StoredWrapper<C, S>> extends ImagedMainObject { ...
This class is never stored as this abstract type, though it is this type that is given to my Mongo collection.
Each subclass that is given has each of these generics defined and specialized, and only those concrete subclasses are saved.
However, this now results in the following error when pulling objects out of the database (putting in is fine):
org.bson.codecs.configuration.CodecConfigurationException: InventoryItem contains generic types that have not been specialised.
This is a new error, as earlier versions of the codec did not produce this, and breaks my setup when moving to the newer codec.
Is this a regression? Result of new changes to the codec?
I feel the codec should be a little smarter, and is currently being rather preemptive by disallowing based on anything related to superclass, especially when `@BsonDiscriminator` is at play. The codec should know exactly which class is being pulled out of the database and handle accordingly.