Moved functionality from MongoMappingConfigurationBuilder into MongoMappingContext. Adapted namespace parser to the removal of the MappingConfigurationBuilder component.
Moved functionality from MongoMappingConfigurationBuilder into MongoMappingContext. Adapted namespace parser to the removal of the MappingConfigurationBuilder component.
Renamed MappingConfigurationHelper to MongoPersistentEntityIndexCreator as this is the purpose of the class. Refactored it not be ApplicationContextAware, Initializing bean but rather simply use the injected MongoMappingContext and MongoTemplate to trigger index creation. Added base-package parsing for entities annotated with @Persistent and @Document to be added to the MappingContext. Moved createPersistentEntity and createPersistentProperty methods into MongoMappingContext.
We also pick up the ID attribute to be used to determine isNew(…) if the RepositoryFactoryBean gets a MappingContext injected. Collection name of mapping defaults to the simple class name.
On COnverter registration we now keep track of the types the converter can register and only apply custom conversion if we had discovered a custom converter initially.
Before recursively converting values itself, MappingMongoConverter now checks whether the underlying ConversionService can convert the value to be converted into a Mongo basic type itself.
Explicitly remove converter for Object -> String on instance creation which allows us to get rid of the ugly SimpleToStringSuppressingGenericConversionService. writeCompoundValue(…) now asks the ConversionService whether it can convert the value to be written into one of Mongos native primitive types and rather delegates to the service instead of recursively writing the value itself.
Removed possibility to use custom ConversionService and rather provide a setter to allow registering custom Converter and ConverterFactory instances. This way we can use a custom ConversionService our own that does not regard the ObjectToStringConverter registered by default. This way ConversionService.canConvert(…, String.class) will not return true by default.
Changed MongoPropertyDescriptor.isMappable(…) to check whether the owning type actually has a field with the property name. If not the property will not be regarded as mappable. This results in plain functional getters (that are not a bean property getter actually) to be skipped transparently.