senecajs / seneca-mongo-store

Node.js Seneca data storage plugin for MongoDB
MIT License
35 stars 43 forks source link

Support entity canon zone / Workaround Duplicate Key / Support hint / Support BSON / Remove Mongo 3 Warnings #71

Open jeromevalentin opened 5 years ago

jeromevalentin commented 5 years ago

This is allowing one plugin to deal with multiple databases on the same computer. The mongo connection (MongoClient) is hold by the plugin, and the db/name or name part of the database URI is now optional. The plugin will use the entity's zone as database name or the database name provided in option as default database if no zone is provided in the managed entity. Then all entity related operations are done on the corresponding database through the same MongoClient!

rjrodger commented 3 years ago

Awesome! Will need consideration in the context of overall seneca-entity design considerations.