playframework-elasticsearch icon indicating copy to clipboard operation
playframework-elasticsearch copied to clipboard

Allow custom type mappers

Open kretes opened this issue 12 years ago • 0 comments

It would be nice to register custom mapper for a type of field.

My case is having a jodatime LocalDate class in an entity, which I would like to be treated as java.util.Data. From what i see I guess some strategy should be used in MappingUtil, so that I can do:

MappingUtil.registerMapper(LocalDate.class,new LocalDateMapper());

the interface for mapper should probably include a conversion between string value and object.

kretes avatar Jul 26 '12 12:07 kretes