const classafMorphia::Morphia
sys::Obj afMorphia::Morphia
(Service) - The main entry point into Morphia.
- database
const Database databaseThe MongoDB database this
Morphiainstance wraps. By default the database is taken from the MongoUrl.- datastore
Datastore datastore(Type entityType, Database? database := null)Returns a
Datastoreinstance for the given entity type.If
databaseis null, the default database from the Mongo connection url is used.- fromMongoDoc
Obj fromMongoDoc(Type entityType, Str:Obj? mongoDoc)Converts the given Mongo document to a Fantom entity instance.
- get
@Operator
Datastore get(Type entityType, Database? database := null)Convenience / shorthand notation for
datastore(entityType, database)- toMongoDoc
Str:Obj? toMongoDoc(Obj entity)Converts the given entity instance to a Mongo document.