I'm trying to convert from mongo document to java class an abstract embedded class.
In my dto i am using the @JsonDeserialize in the constructor to achieve this like follow:
@JsonCreator
public ParentClass(
@JsonProperty(value = "id", required = true) @Nonnull String id,
@JsonDeserialize(as = MyEmbedded.class) @Nonnull MyAbstract embedded
) {
super(id,
....
But i don't know how to achieve this from MongoDocument to Java class.
Is there some @JsonDeserialize equivalent for mongo?