Comments (15)
I'm also just generally curious why strapi has chosen to switch ORMs.
from strapi.
@devinivy
As @loicsaintroch said on the Slack #framework channel:
Hey @channel! As you all know we currently use the Waterline ORM. Unfortunately, there is no more maintainers taking care of it, both the core and the adapters... So, we definitely need to change the ORM since most of the issues we encounteer on Strapi are due to Waterline. We really need to know: which DBs do you use? What ORM do you like and why?
Please join the Strapi Slack instance for such questions at http://slack.strapi.io/
from strapi.
Hey!
Sorry for the lack of communication those last few days— we were just enjoying holidays. Time to get back to work!
First of all, Strapi needs a production-ready ORM which is not the case of Waterline mainly because adapters are too unstable and not well maintained to make a stable product like we need. We can’t give an all-in-one stack with some bugs coming from a dependency. If you take a look at our issues almost all of them are due to Waterline.
Also, every NoSQL database has its own use and specific features. For example, an admin panel can’t really interact the same way with a MySQL database than with a Neo4j database. We can’t take advantage of every NoSQL database specialties. NoSQL is good but for specific use. This is not our case.
Strapi uses more and more relations as long as you follow the conventional structure. That’s why a SQL ORM is more appropriate. The main Node.js SQL ORMs are Sequelize and Bookshelf. The both of them have pros and cons. We still don’t know which one to use. I personally prefer Bookshelf for its approach using the Knex query builder but Sequelize seems more stable— need feedback here.
We thought about being ORM agnostic which is technically great. Unfortunately this is not our philosophy since we want an all-in-one stack— we can call it a Data Management Framework. If we support several ORMs we won’t be able to have a marketplace since every item won’t have the same structure. However, you’ll still be able to use your own ORM on your side but the Studio won’t work with it. We’ll only support the official ORM used by the Strapi framework.
To finally answer your question: we won’t officially support MongoDB as a database but you’ll still be able to use it on your own. The user management and the Studio won’t be compatible with it since it’s developed to only work with the official supported ORM.
I hope I answered your question but I let the issue open since we really want/need feedback on this.
Thank you for your question @akoudal.
from strapi.
Thanks for the detailed answer - it definitely answered my question.
Bad news for me, as the studio API generator and user management is brilliant.
I'll definitely keep this project on the radar, and get back if I do a sql project.
Cheers,
Allan
from strapi.
We give some thoughts about the ORM roadmap and put it some work.
I have a very early prototype of Strapi working both with Waterline and Bookshelf without changing the models at all. So we definitely can make this work with Mongoose or whatever on the framework. However, we'll need to make it right on the Studio regarding the UX on the settings page.
I don't want to rush anything here but if it works correctly with Bookshelf and Waterline I don't see why we won't make a Mongoose hook and support it on the Studio since we don't need to change the model definitions.
As I said, don't take my word as a final decision but more as a possibility.
from strapi.
I kind of like the approach of waterline honestly. I rarely use a SQL database these days with my apis, and I would rather see a data storage agnostic approach with squelize or orm "x" as the default. As long as I'm not pinned to a particular implementation, I think it would be most beneficial.
I'd be happy to help if you'd like to collaborate with your ideas.
from strapi.
There's another adapter based ORM named Firenze which looks nice, but does not support associations in the way Waterline does. It's a young project, and not heavily "featured".
from strapi.
What's the beef with waterline?
from strapi.
I've used this one before it was quite pleasant. http://www.camintejs.com/en
from strapi.
We'll use Bookshelf with Knex as the default ORM but you'll be able pull it out since it won't be part of the Strapi core. This way, you can move to another ORM like Waterline. Here are the repos (empty for now):
from strapi.
Is the plan to then support these orm's via a plugin interface?
from strapi.
We'll support several ORMs via the hook system. The Strapi core will require mandatory ORMs from the models thanks to orm
key in each model.
from strapi.
Seems reasonable to me...
from strapi.
We decided to support several ORMs aiming to allow you to use other DBs such as MongoDB, ArangoDB, RethinkDB, Redis, etc. if you have specific needs.
from strapi.
Awesome
from strapi.
Related Issues (20)
- Email field is disabled for new registration HOT 1
- Filters disabled when filtering for invalid / non existing input
- Keep trying error at strapi new project HOT 2
- [ STRAPI 5 BETA ] Components Created Show No Permission To See This Field
- Markdown Editor Auto-scrolls to top when formatting applied
- Upload plugin: value of "quality" parameter doesn't apply to thumbnail and breakpoints
- Upload plugin: "sizeOptimization" parameter in the config of plugin doesn't correctly apply to thumbnails and breakpoints.
- Brand new v5 install, error on first startup - Error: Cannot find module '@strapi\plugin-content-manager\package.json' HOT 3
- nx run @strapi/plugin-i18n:build HOT 1
- nx run @strapi/plugin-i18n:build error HOT 2
- bulk publish only works for the first selected item
- Error on installation...
- Developing locally pointing to production database dropped data HOT 3
- Snip HOT 3
- in Uid field the available option is on top of the field value when we have a large uid value HOT 1
- Strapi transfer does not work with aws waf standard rules HOT 2
- [Strapi 5 Beta] Maximum call stack size exceeded error when using a self-referencing relationship HOT 8
- Unable to Publish Single Type in Non-Default Locale if It's Not Created in Default Locale HOT 2
- NOTICE: Formidable Vulnerability is NOT valid HOT 1
- RBAC not working for plugins
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strapi.