There are multiple collections in my project. Each collection is named after the username. For ex: “Jackdb” where Jack is the username. So I’m trying to load collection after the user login as shown below.
CurrentDB = new Mongo.Collection(user+“db”);
But the above function runs perfect for the first time. But every time on every new page visit, I get an exception such as - Exception from Tracker afterFlush function: debug.js:41 Error: There is already a collection named “jackdb”. Because the collections are getting loaded everytime new page is visited for the same user. Is this a correct way to proceed or any other good way to load collections dynamically. Please help me on this one. I’ got stuck in it for a while