Open atrakeur opened 8 years ago
Good also am more sequelize fan, but in the past we discussed this in gitter, the walterline would be better for the number of drivers as you mentioned, for me the two are valid, and on developing an ORM think it is for a future PR!
I have found this project which seems to be very promising: https://typeorm.github.io Maybe it can be used in this framework as default ORM?
Yeah I agree it's promising and surely better than our home grown solution. If someone out there is ready to submit at least a proof of concept of how it can be integrated in the framework it would be cool.
The original typeframework used to provide a waterline orm implementation.
However, it was quite sketchy (read and write info from d.ts files, then bind manually to Waterline). On the other hand, waterline is getting more and more issues (see https://kev.inburke.com/kevin/dont-use-sails-or-waterline/ ). Also it is not really typescriptable (no typings definition) and doesn't seems really good performance wise (no transaction, no batch query, and some dumb behavior with count).
I plan to rewrite the old Database layer. So it's time to pick the right underlying ORM.
Here are the current options:
My personnal favorite at first glance is Sequelize, but I'm really open to suggestions/comments/anything that can change my mind.
No matter what ORM we choose, it must provide both explicit (this.property = {params}) and Decorator based interface (@Model(...), @Property('type' = String)). The goal is to provide both just like the Router I wrote last week (you can registerRoute manually, or use @nnotations with the ControllerServiceProvider).
What's your opinion on this?