I have an enum with rather long names and shorter per-value "tags" that I want to use for serialization. I've implemented a Converter pair that maps the values back and forth. They work properly when saving a Set of the enum.
However, when saving a Map<MyEnum,?>, the converter method is skipped; the enum's name is still used as the map key saved to Mongo. This would be frustrating but work-aroundable, but the proper converter is applied on reads. This means that when I save an object with a non-empty map and immediately attempt to read it, I get an exception when calling the read converter (since it's being supplied an invalid argument).
The problem appears to be at MappingMongoConverter:644, where the conversion service is explicitly skipped. This means that converters are applied to all types on read, and to all instances except map keys on write
I'm glad to see a fix, but I disagree with both the priority and text changes. The problem is that this introduced data corruption because of inconsistent treatment of the map keys. Not using converters at all would have been a minor bug, but using them for read but not for write meant that data written by the repository would immediately cause exceptions when trying to read it back