How do you reference unstructured, multi-level data (as a Map) in Spring Data Document MongoDB?
I'm trying to represent the following object:
With the following class:Code:{ '_id': (Object ID Here) 'name': 'john', 'data': { 'pet': 'cat', 'other': ['some', 'stuff'], 'more': { 'unstructured': 'info' } } }
Right now I get an Exception in MappingMongoConverter.findTypeToBeUsed because it tries to call [dbObject.get(CUSTOM_TYPE_KEY)] on a `DBArray` (because 'other' is a `DBArray`)Code:@Document public class Person { ObjectId id; String name; Map<String, Object> data; // Schemaless data for which I do not know the structure }
Any ideas? Or is this just a bug?


Reply With Quote
