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)
- [BUG] Strapi loses the connection to the server after saving changes on entities HOT 1
- [BUG] Drag and Drop is not working on List View editing
- core::5.0.0-discard-drafts migration fails when not using i18n HOT 6
- Condensed Main Nav: icons are misaligned + Strapi logo redirecting to Homepage is not clickable anymore HOT 1
- Unable to build the production Docker image due to sharp installation issues. HOT 1
- Types for ctx.query in custom controller appear to be broken HOT 1
- New project creation fails with type error HOT 3
- Component : when using Time field with only time type, format is not valid and entry can't be updated with time info
- Unable to use axios server side with the new `strapi plugin` command HOT 1
- v5: It does not allow to select multiples images in field: multiple media
- GET /upload/files or any GET from content-types always returns 401. HOT 4
- [BUG] Populating locales programatically breaks the admin
- Contributing to strapi HOT 1
- Stuck at the creating admin step , it never finishes HOT 1
- Where is created_at, updated_at fields in components ??? HOT 1
- Strapi import functionality is very very very slow (max 45KB/s) HOT 3
- Filter by text field with "&" symbol doesn't work
- d.ts files aren't linted
- [BUG] Any Single Type shows endless load spin in Content Manager in version 4.24.1 HOT 2
- rtl missing from auth form
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.