Meteor - connect collections of multiple databases -


in meteor (server side), possible create collections of multiple databases?

let's want connect 2 different databases , mount collections in meteor. concern collections same name in both databases (for example "users").

is there way have 2 collections named "users" 2 different databases (connections)?

thanks!

edit:

the other question not address main issue: if want mount (connect) 2 collections named "users" (for example) 2 different databases.

meteor says:

error: method named '/users/insert' defined

i reopened question, there no easy answer. mongo driver assumes 1 connection per collection. aside, reasonable assumption - if did write, db updated?

here ways work around limitation without implementing own driver:

  1. declare more 1 collection (users1 , users2), each collection has access 1 of database instances. technically work fine, may not easy in code.

  2. use external process regularly copy contents of 1 collection db1 db2. lets use single collection, complicated if of documents being written external applications.

  3. only use methods access data instead of publishing client. lose ability have collection semantics on client, can directly control how database used. see answers this question examples of how directly use instance of remotecollectiondriver.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -