const mixinafMorphia::Converter
afMorphia::Converter
Implement to convert Fantom types to / from a MongoDB representation.
- toFantom
abstract Obj? toFantom(Type fantomType, Obj? mongoObj)
Converts a Mongo object to Fantom.
mongoObj
is nullable so converters can create empty / default objects.- toMongo
abstract Obj? toMongo(Obj fantomObj)
Converts a Fantom object to its Mongo representation.
Must return a valid BSON type (or a List or Map thereof).