How to Flatten dynamic field with parent document - Spring data Mongo DB
问题 In my Spring boot project have a Document like so: @Document(collection="AuditTable") public class AuditTable { @Id private String id; private Map<String, String> properties; where properties is a dynamic field i.e. it can take in as many different key-value pairs. I use MongoRepository to store this value: @Repository public interface AuditTableRepo extends MongoRepository<AuditTable, String> { } Now when I store it in the Collection it looks like this: whereas I want it to look like this: "