Use Rename collection in mongoose
Clash Royale CLAN TAG #URR8PPP Use Rename collection in mongoose I have a problem. I renamed my collection responses into old. It works really well but now I need to retrieve my data and my impediment is that I only used the model to retrieve my data from a collection. But now I need to retrieve my data from my renamed collection but I have no model and schema. I tried to create a schema and a model but it didn't work. It returns no elements. Here is a part of the code : app.get("/Play", function (req, res) { var urlTempBox = 'http://localhost:3000/Play'; /////////////////////////////////////////////////////////// request(urlTempBox,function(error, response, body) { if (error) { throw(error); } else{ var jobj = JSON.parse(response.body); persistRS(jobj); setTimeout(function() { ResponseDatabase.find() .populate('unitCode') .exec(function(err, finalData){ ...