facet classafMorphia::Property
sys::Obj afMorphia::Property : sys::Facet
Marks a field as a property of a MongoDB document.
- defVal
const Obj? defValWhen saving to MongoDB, any Fantom value that equals this
defValwill be treated as if it werenulland (depending onObjConverter) will not be saved.When loaded from MongoDB, any
nullvalue will be converted to thisdefVal.This is most useful for saving marker booleans and to avoid saving empty lists and maps.
- implType
const Type? implTypeThe implementation
Typeto 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? nameName of the MongoDB object key this field maps to.
Defaults to the field name.