const mixinafMorphia::BsonConv

afMorphia::BsonConv

Implement to convert custom Fantom types to / from a BSON representation.

fromBsonVal

Source

abstract Obj? fromBsonVal(Obj? bsonVal, BsonConvCtx ctx)

Converts a BSON value to Fantom.

bsonVal is nullable so converters can create empty / default objects.

toBsonVal

Source

abstract Obj? toBsonVal(Obj? fantomObj, BsonConvCtx ctx)

Converts a Fantom object to its BSON representation.

Must return a valid BSON value (or a List or Map thereof).

fantomObj is nullable so converters can create empty / default objects.