facet classafMorphia::Property
sys::Obj afMorphia::Property : sys::Facet
Marks a field as a property of a MongoDB document.
- defVal
const Obj? defVal
When saving to MongoDB, any Fantom value that equals this
defVal
will be treated as if it werenull
and (depending onObjConverter
) will not be saved.When loaded from MongoDB, any
null
value will be converted to thisdefVal
.This is most useful for saving marker booleans and to avoid saving empty lists and maps.
- implType
const Type? implType
The implementation
Type
to be instantiated should this field reference a mixin or a superclass. Used when mapping from MongoDB documents to Fantom objects.Defaults to the field type.
- name
const Str? name
Name of the MongoDB object key this field maps to.
Defaults to the field name.