I want to connect to different databses and get data from the same collection. ex collection name is groups
I'm using
var database = new MongoInternals.RemoteCollectionDriver(dbURI);
to initalize remote db connection and
then using
var Groups = new Mongo.Collection('groups', { _driver: database });
after doing this meteor registers methods groups/insert groups/update and groups/removed to my collection
this is working fine for first db, when I try to connect to the second db it is throwing error saying
Error: A method named '/groups/insert' is already defined
from the error I get it that I'm initializing same collection again but with different db and meteor is trying to register method and it fails
so here I want to de-register my collection from app so meteor will remove grousp/insert methods from the app and then when I try to initialize it again it works fine.
any help appreaciated.
NOTE
I can do this also
database.open('groups').findOne({ displayName: 'group1'});
but opening the db for each and every query is taking time so response is time is more.
If any one knows other ways to do this please answer ( using node mongodb driver maybe??)
EDIT
NOTE: I don't need to listen to the changes of remote collection, I just want to connect to them and perform few queries and close the connection.
