No accessor to set property private final java.util.Map com.couchbase.client.java.document.json.JsonObject.content!

I have this Java object:

@Data
@Builder
@AllArgsConstructor
@JsonInclude(NON_NULL)
@EqualsAndHashCode
public class HostelData {

@Field
private @NotNull String id;
@Field
private JsonObject payload;

}

I save it on the couchbase DB :

String entityPayload = “{ “name”: “SDFSDFDS”, “java”: true }”;

	HostelData hostelData =
			HostelData.builder()
					.id("1")
					.payload(JsonObject.fromJson(entityPayload))
					.build();

and the document is saved like this:


“payload”: {
“content”: {
“java”: true,
“name”: “SDFSDFDS”
}
},

but when I get the object from the repository, I got this error:
java.lang.UnsupportedOperationException: No accessor to set property private final java.util.Map com.couchbase.client.java.document.json.JsonObject.content!

Hi Sandro,

Can you reproduce the problem without Lombok?

Thanks,
David