I'm finally trying to migrate from 2.x. I have a lot of code of the form:
JacksonDBCollection.wrap(collection, SomeType.class, CustomId.class, objectMapper);
where CustomId is a class with @JsonValue and @JsonCreator annotations that allow Jackson to serialize it to a string. With 2.x, this was supported and used the String serialization of CustomId as the id.
With 3.x and 4.x, the generic key type has been removed from JacksonMongoCollection, and I get the following error when trying to insert:
java.lang.IllegalArgumentException: Unsupported ID type: class foo.bar.CustomId
Is there any way to get the equivalent old functionality?
I'm finally trying to migrate from 2.x. I have a lot of code of the form:
where
CustomIdis a class with@JsonValueand@JsonCreatorannotations that allow Jackson to serialize it to a string. With 2.x, this was supported and used the String serialization ofCustomIdas the id.With 3.x and 4.x, the generic key type has been removed from JacksonMongoCollection, and I get the following error when trying to insert:
Is there any way to get the equivalent old functionality?