const classafMorphia::Morphia

sys::Obj
  afMorphia::Morphia

(Service) - The main entry point into Morphia.

database

Source

const Database database

The MongoDB database this Morphia instance wraps. By default the database is taken from the MongoUrl.

datastore

Source

Datastore datastore(Type entityType, Database? database := null)

Returns a Datastore instance for the given entity type.

If database is null, the default database from the Mongo connection url is used.

fromMongoDoc

Source

Obj fromMongoDoc(Type entityType, Str:Obj? mongoDoc)

Converts the given Mongo document to a Fantom entity instance.

get

Source

@Operator
Datastore get(Type entityType, Database? database := null)

Convenience / shorthand notation for datastore(entityType, database)

toMongoDoc

Source

Str:Obj? toMongoDoc(Obj entity)

Converts the given entity instance to a Mongo document.