balderdashy/sails-mongo — pull request #144 by virteman (2014-05-11 10:41:35+00:00)
Title: limit db  connection only one as expection

I've found sails-mongo make many db connections when sails lift. After took a short experiment, I dig out the problem is that waterline make async call each model's define initial. Async execute every item concurrently, so the connection varialbe switch lost the limit function.

To resolve the issue, I've introduced an eventer into spawnConnection function.