const classafMorphia::Morphia
sys::Obj afMorphia::Morphia
(Service) - Mongo to Fantom Object Mapping.
- bsonConvs
const BsonConvs bsonConvs
The Object-Relational-Mapping converters.
- connMgr
const MongoConnMgr connMgr
The underlying connection manager.
- datastore
Datastore datastore(Type entityType)
Creates a new
Datastore
instance for the given entity type.- db
const MongoDb? db
The referenced database (if defined).
- dbName
const Str? dbName
The 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
MongoQ
instance 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.