Skip to content

Spring-Data Mongo doesn't use converters while serializing key Objects from Map Properties [DATAMONGO-449] #1387

@spring-projects-issues

Description

@spring-projects-issues

Alexander Bätz opened DATAMONGO-449 and commented

While serializing properties/objects of the type Map the keys are serialized by using the toString() method.
This fails for complex classes even when there is a Converter<MyComplexClass, String> for it.

During deserialization the string representing the id is deserialized by using the converters, so a workaround is to call the proper converter in the toString() method. But this only works for classes that can be converted from/into strings


Affects: 1.0.1

Issue Links:

  • DATAMONGO-242 Allow using complex types as Map keys
    ("duplicates")

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions