spring-data-mongodb
spring-data-mongodb copied to clipboard
MappingMongoConverter#writePropertyInternal should prefer custom converters before simple type conversion.
org.springframework.data.mongodb.core.convert.MappingMongoConverter#writePropertyInternal(Object, DocumentAccessor, MongoPersistentProperty) appears to prefer serializing as a collection/map before checking if there are custom converters.
This is different than MappingMongoConverter#writeInternal(Object, Bson, TypeInformation), where the custom target is honored first. Is this by design? What is the reasoning for treating properties any differently than the objects themselves?