spring data mongodb mapping dynamic field
问题 I've this model in my java class @Document public class Template { private String type; private String code; @Version Long version; } I need to add a new field, named template , and map this field as dynamic in other words I would model a document like this { _id: 'id' type:'myType', code:'myCode' template:{ someFiled:[ { subField1:'value1', subField2:'value2' }, { sub1Field1:'1value1', sub1Field2:'1value2' } ....................... ], otherField:[ { otherField1:'value1', otherField2:'value2'