const classafMorphia::Morphia
sys::Obj afMorphia::Morphia
(Service) - Mongo to Fantom Object Mapping.
- bsonConvs
const BsonConvs bsonConvsThe Object-Relational-Mapping converters.
- connMgr
const MongoConnMgr connMgrThe underlying connection manager.
- datastore
Datastore datastore(Type entityType)Creates a new
Datastoreinstance for the given entity type.- db
const MongoDb? dbThe referenced database (if defined).
- dbName
const Str? dbNameThe name of the database (if defined).
- fromBsonDoc
Obj? fromBsonDoc([Str:Obj?]? bsonObj, Type? fantomType)Converts a BSON object to the given Fantom type.
- get
@Operator
Datastore get(Type entityType)Convenience / shorthand notation for
datastore(name)- make
new make(Uri connectionUrl, BsonConvs? bsonConvs := null, Str? dbName := null, Log? log := null)Creates a new Morphia instance.
- prettyPrint
Str prettyPrint(Obj? entity, Int? maxWidth := null, Str? indent := null)Converts the given entity / object to BSON and pretty prints it.
- query
MongoQ query()Creates a
MongoQinstance that's adapted to query Morphia entities.- shutdown
Void shutdown()Convenience for
MongoConnMgr.shutdown().- toBsonDoc
[Str:Obj?]? toBsonDoc(Obj? fantomObj)Converts the given Fantom object to its BSON object representation.