Refactored spatial domain classes to use each other a bit more. Added assertions to fail fast on invalid usage. Improved Geospatial index creation in MongoPersistentEntityIndexCreator by using the index abstraction instead of manually building the DBObject.
Fixed implementation of SimpleMongoRepository.deleteAll() to not drop the collection as this causes indexes to be dropped as well.
Skip index creation from query methods for now if we encounter a Near or Within part as we can't build combined queries right now.
Enabled treatment of not annotated classes as embedded documents to let Querydsl create query classes for them. Annotated BasePerson with @QuerySupertype as Querydsl seems to need this annotation to create the query class for super types in the 2.2 branch.
That issue is tracked in https://bugs.launchpad.net/querydsl/+bug/776219 so that we should be able to remove the annotation as soon as this one is fixed.
Adapted changes in Spring Data Commons. Adapted test cases accordingly. Introduced SimpleMongoMappingContext that that reflects the meta-model assumptions in SimpleMongoConverter. Adapted repository factories accordingly as we can now assume that there is a MappingContext available always.
Refactored QueryMapper to be stateless so that we don't need to recreate instances of it. Added unit tests to verify id property to key mapping and type conversion to ObjectId.
Polished MappingTests to simply drop the database after all test were finished to make sure it starts with a clean state on a potential next run.
Converters are now considered for both reading and writing. I also added a shortcut to invoke custom converters for top level types. So far the registered ones had only be used for properties of the given root object, not the root object itself.