I’m creating an app which connects to the database of an existing app in order to moderate carry out admin functions on said app. I’m connecting to the collections in the following way:
var database = new MongoInternals.RemoteCollectionDriver(mongodb://…);
Collection = new Mongo.Collection(‘collection’, {_driver: database});
This works great with most of the collections that I’m working with, but I’m struggling with users where I get the error “Error: A method named ‘/users/insert’ is already defined”. I understand that this is an issue with having a users collection on both apps. I see from here Remote Database has the same collection name that I could search through them using database.mongo.find(‘users’), but would like to be able to handle it with its own collection on the new app. is this at all possible?
This appears to connect fine, but when I do .find().fetch()… no actual data comes out (when I know there is data on the other application). I can definitely see the connection coming in on the other server. This doesn’t seem to work for any of my collections, where as the method outlined above does…