Apparently all I had to do was to rename
public String id;
to
public String _id;
(Annotating the field with @JsonProperty("_id")
also seems to do the trick. AFAICT there's no way of saying that public String id
should replace the _id
field. If someone knows how to do this, I'm interested in how.