the usecase is to audit data changes of documents in a mongodb collection, and the global key(which can identify a specific document) is needed when edited data commit, just like:
globalId_key: "MyRecord/333"
so I wrapped a DTO object as below:
@TypeName("MyRecord")
@Data
public class RecordDto {
@Id
private Long recordId;
private Document data;
}
the data property has many entries and each entry’s value was limited to types:int, long, string only.
but when I commit this edited record, the audit info always report only 1 property(“data”) changes, how to make the changed entries present in changes properties?
i have thought about to commit the Document object directly, but it can not generate record id.
how to deal with this situation?