Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Mongoose better than waterline in a Sails app?

I am developing a sails.js app. In my previous sails app, I used MySQL with the default waterline ORM. I am planning to use Mongodb in my new app. I have come across limitations with waterline, one of them being, querying an association. My current app is logically intense and deals with a lot of statistical data. Is it safe to continue with waterline or replace it with Mongoose?

like image 606
Jaseem Abbas Avatar asked Jun 17 '15 07:06

Jaseem Abbas


2 Answers

Waterline is getting better and supports for many features that were missing lately. Since both have association support now, any of them would be fine for this task. Only advantage is Waterline is that if the project is based on Sails, using it would be much easier.

Waterline associations

like image 74
harunurhan Avatar answered Nov 17 '22 12:11

harunurhan


There is an example on Github for a Mongoose ORM Hook that should facilitate the disabling of Waterline and other associated hooks and enabling Mongoose as the ORM to use in your apps.

like image 1
netlander Avatar answered Nov 17 '22 14:11

netlander