472096 (1) [Avatar] Offline
I did go for the multiple connection and choose .createConnection in stead of .connect. I think this more a simular to reality with for example a login database etc..

Half way chapter 6, p184 I tried to make connection but the server keeps hanging..


I found out that mongoose.model() must change into db.model() to solve this.

So I change this everywhere mongoose.model is mentioned? Controllers? Locations.js in models map?

simon.holmes (146) [Avatar] Offline

Yes, that's right. In this case the models aren't created against
so can't be accessed that way - when you have separate connections the models can't be held in a shared reference as there's a possibility that you could have collections or schemas of the same name in two different databases.

Hope that helps.