-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃殌 Feature: Maps / Nested Documents / Relationships support #2735
Comments
@koodeau Thanks for the reply! Well, I don't think that's what I'm looking for. I'd be happy to be wrong about that :-) I have "arrays" of Strings and Numbers in my data but I'm really talking about "Map" attribs. Some people call these "nested docs" or "subdocs". For example...
The "address" attribute is a Map. We can't do this in an Appwrite document. And also arrays of Maps are needed. You can do these in all the other popular NoSQL dbs so I'm hoping it finds it way here :-) |
Right now we support a flat design. This means that instead of storing the |
@eldadfux thanks for the reply. I guess the comparisons to Firebase confused me and led me to immediately assume NoSQL. I admit to not really knowing much about MariaDb. Is there an Appwrite roadmap anywhere we can see/follow? |
@locohost currently this is the closest thing we have to the roadmap: https://github.com/appwrite/appwrite/projects?type=beta. You can also view Github issues that are marked as backlog, waiting for release or work in progress. We do plan to sync our internal issues on Github project, it's just a bit tricky to execute the process and might take a while. |
any update? |
I'm lucky to see this before investing lot of time trying to use Appwrite, as for now I think I will go with supabase. I will come back when this issue is closed. |
Hello, appwrite ticks all of the boxes for my project, but one is missing.. relations, my project will grow really big and i dont want any duplicated data in database, when can i expect this feature? Does anybody know about alternative that has relations, realtime, sdk, rbac? Thanks! |
I dont undestand this part too...I mean its presented as sort of nosql db, but we cant have schema-less documents. Its using sql db instead but we dont have relations, counts even update/deletion based on query. I dont really understand why, decide to go one way and optimise it that way OR even go both ways and make connectors do different DB types and let users decide what they prefer |
@radvansky-tomas exactly. I mean, by default in docker i see mariadb, mariadb has relations, its bummer, that its not available. |
@radvansky-tomas this is prototype, im not 100% sure about performance and quality, but good start:
|
What is the current approach to deal with relations? |
@locohost Just an update that we have seen your issue and had discussions for the last couple of weeks around this. It looks like it is for sure on the roadmap, but we don't have an exact date yet. We also plan on working on a public roadmap to share with others to be extra transparent with the Appwrite community. |
Update: @fogelito has started research on different ways this could be implemented internally in Appwrite. @Meldiron will also provide some help in designing the way this will be exposed to the REST API and different SDKs. Once we have some more information we will share it here and in a GitHub discussion before starting actual implementation. |
Hey, any updates on this? Been awhile since the last update. Sadly, only this keeps me from using appwrite. |
Same here, I really wanted to use appwrite for my next project but it can't handle any sort of relationship between objects. I guess I'll give supabase or even pocketbase.io a try. |
Even though it needs a bit more configuration, parse seems to be a very good alternative in the meantime. |
Nesting or relationships are really needed. This is a great competitor to firebase along with Supabase and others. I hope you're able to give an update on this in the coming months. |
If nesting will be applied queries need to be adpated to be able to use nested documents properties like with mongoDB |
The content-types builder of Strapi is exactly what I would love to see: |
I agree with many comments here about the essential nature of relationships. We are all aware of the flexibility of nested types, but relating entities by ID is an important way of ensuring centralised data changes are reflected in all areas of the data model. If we edit the mobile phone number of a user, we don't want to have to find all documents the mobile was stored in. When we read the graph of the user, we want their contacted details as an up to date nested object, for example. This might be solved in the monodb stage of Appwrite's development, or perhaps through GraphQL, which might be a proxy for referential integrity / relationships. BTW, I am a big fan of Hasura (GraphQL) and Postgres. I've seen other low code platforms just build on top of these. |
This is more than a bit frustrating. How could I go about setting up the classes array information (id, name, description) without using a map? I was hoping this would be a part of 1.10.
|
@dhust, same here, what I ended up doing is use a String field and store a JsonEncoded map and decoding it after loading the object. It works quite well but you have no control on queries related to specific fields inside the map. But if you just want to store data this should work for the moment. There is a lot of limitations with the Appwrite database, no grouping, no aggregations Sum and Count even though it's an SQL database, and we don't even have safe ways to create these Sum and Count values as metadata because there's no way to prevent race condition on those values at the moment. |
Any progress here? |
No dates, but we plan to add relations (so it's on the roadmap) |
At the moment, although i really want, i have a hard time using appwrite on any serious project. But if you guys really want to police database queries (i really dont understand why?!), please do it in a way that's sensible. I want to be able to do complex queries based on indexed data using all types of joins available in mysql/mariadb. Thank you. I hope you will consider my request. |
Although Appwrite released their own GraphQL API, I'm currently writing my own (not from scratch, but I'm adapting an GQL API I already had into Appwrite, so that's why I don't just simply use the native one.) It's not a joined query, but it gets an ID from a row from Table A and then gets this ID from Table B. It's working, I'm currently writing the mutations to create many related rows in a single GQL mutation query. All this to say, I can already write my own server layer that fetches these related rows and returns them in a single API endpoint. I don't know the performance difference from having a native SQL |
@ciprianm11 @rhengles Thank you for your input! This is a topic we've had lots of discussions about and healthy debates about within our team, too! We're trying to hit a sweet spot of not leading users, especially new developers to doing things that are serious malpractice (like you often don't need complex queries, and permissions + local data manipulation is, in fact, better) but we also acknowledge more complex entity-relationships are just necessary. Anyway! Keep pushing for this to happen and give us feedback. This helps us make smarter product decisions! |
so i have mush simpler problem, i don't need to query or any thing, but i need a map attribute (not subdocument/struct, proper dynamic map) My use-case is quite simple too customer could u create a simple mid-ware that lets dev have more control over string attribute, like this string is json, etc... i suggest very simple thing... create Map-attribute & struct-attribute, appwrite will do encoding & decoding and will store as string... this was backend will validate data received, without writing any lambda functions. |
Perfect! Thank you for all the details :) This will help us a lot as we're writing the RFCs for this topic. |
From #5023 馃敄 Feature descriptionwe can see basic use cases like
and converting this into something like
would be a bit buggy, because it is possible to have addressLine1 be null & addressLine2 be string. which don't look very good. 馃帳 PitchWe can simply have a Object attributeOnce dev select Object attribute, then it is simple matter of validation check. like
basically once object attribute is selected all you have to do is validate if incoming object is correct or not based upon presented structure (syntax of structure can have more complex validator, such as minimum Require validator
Optional validator
Read, Create, Update, DeleteFor Read/Write: this attribute will be stored as creating specific inner field updates (like firestore) is fairly possible, but i have a much simpler alternative: Indexindexing any of the inner fields should be easy, |
Not having relationship modelling capabilities is a huge deal breaker. I might be missing something, but it feels like this also defeats the purpose of having GraphQL when collection schemas are always flat. You have to reconstruct the model manually and notoriously update IDs everywhere they are referenced. I'm genuinely curious what were the main challenges around delivering relationship mapping sooner? Thanks in advance! |
I was almost convinced that appwrite was what I was looking for, for my current project, as it included everything I needed out of the box, until I came across this issue. Appwrite not supporting relationships is a big no for me, I guess I'll still have to go with supabase instead, at least until appwrite becomes more mature for serious projects. |
I have been following the project for a very long time. The project is really interesting, but without a relationship system it is impossible to work with Appwrite. Unfortunately, over the past year, the relationship function has not appeared. I don't know how the appwrite validates incoming data, but jsonschema can be used for complex structures and types. |
I can finally confirm that work on relationships / nested documents has officially began! Transaction are probably one of the next features just after that. |
@eldadfux Can you say something about the time frame when you think it might be implemented? (Just very rough, 1 month, 3 months 6 months...) (I am sitting with some data structures that would be significantly simpler if the functionality coming soon) Otherwise very satisfied so far with Appwrite especially that everything can be written in Dart (am a flutter developer)! |
can you estimate a release date of the relationships feature for databases, and will it leverage the same MariaDB relationships structures, or we should expect nested collections/sub-collections? |
The RFC for database relationships is now available. Check out this discussion thread for more details: #5179 |
We鈥檙e trying to fit this feature to the next release. It will be released as beta. |
This is the last thing to make appwrite to my favorite BaaS |
I join the request thread, good project. Greetings |
Appwrite is great! we are waiting for relationships! Greetings |
@nev-21 it just got merged... and live |
I am happy to announce that 1.3.0 is now released with Relationship support 馃憦馃徎 You can find more informations in this blog post and our docs. |
馃敄 Feature description
We need "Map" attributes and arrays of "Map" attributes to be true NoSQL.
馃帳 Pitch
I'm a long time Firebase/Firestore developer. I used Firebase before Google bought it. I love how quickly FB/FS allows me to put together my project backend and quickly build data models that make sense, do not need data in related tables and therefore have super fast read speeds.
I found Appwrite from a Reddit article. It sounded very interesting, so here I am! :-) My recent Appwrite adventures came about from my desire to support open source projects and the fear of future Google/Firebase bills I cannot afford. We all dream about our apps becoming popular some day right?馃槈
My Appwrite impediments last few weeks have been all about the missing "Map" attribute. I have very little interest in moving away from NoSQL databases. The missing Map attrib is forcing me down many complex database redesign tasks, lots of model redesign and ultimately being forced to convert back to relational database thinking.
Not having Map attrib means I have to JSON.stringify all of my Map attribs, and MUCH worse arrays of stringified models that then may have arrays of stringified models/attribs and so on. This is crazy complicated. This then means I need code in either sync functions (I need to get an http response back with remodeled data) or another REST Api in front of Appwrite to reformat my data back to the models my client UI is expecting. Right now I'm building the REST Api facade. While this is a fun exercise (I love building REST Apis), it is super time consuming and taking me away from my Flutter development.
We need Map (doc) attributes and also, arrays of Maps (docs) to be a true "Firebase alternative" :-)
馃憖 Have you spent some time to check if this issue has been raised before?
馃彚 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: