.manager
このデータストアのライブ接続マネージャーです。
datastore.manager
アダプターに応じて、接続プール、単一の接続、または事前に構成されたクライアントライブラリインスタンスへの参照を表す場合があります。
モデルPet
を表す生のMongoコレクションインスタンスにアクセスします。
// Since the db connection manager exposed by `sails-mongo` is actually
// the same as the Mongo client's `db` instance, we can treat it as such.
var db = Pet.getDatastore().manager;
// Now we can do anything we could do with a Mongo `db` instance:
var rawMongoCollection = db.collection(Pet.tableName);