am try to get the content and other things
You can create relationships manually
it's more work, but it works just as well.
pls how 🤔
if you have the following collections, for example:
teams, managers and employees
each teams document can have only one manager, but multiple employees.
So when you create a teams documents, you can use the document ID of the managers doc, and store it in the teams document.
Same thing for employees
I do front end mostly
may be if you see the conversation, https://discord.com/channels/564160730845151244/1110436420667064460/1110437258047279115
alryt
have gone thru d conversion am not getting...
pls can u walk me thru
What's your database structure like?
Goodevening
No Relationship Attribute on Cloud
@ijay please provide more details. What's each collection structured like? What kind of relations do you want to create?
@safwan good morning, made it a list instead of relationship☺️, am thinking how I can make d document or recipe the user inputs downloadable if they want.
Hi @safwan I have the same issue for example I have a collection that is foodSpot but under that I want to have a one-to-many relationship with foodMenu collection. How do I do this in appwrite cloud do I need to create functions or just use javascript to manipulate the data on my frontend? Thanks
@ijay @Majek
There's a few ways you can go about it. Since cloud is on v1.1.2, and no relations aren't supported, you can manually reference the IDs of the related documents
So in a collection, you can have an attribute called something like child_id, and store the related document(s)'s id in it
How about if I want it to relate to users or the account api? Is it a best practice to create a users collection or just use accounts preferences?
If you have to store user-specific data, there's no harm in creating a collection(s) for it. I've seen the devs mention this many times, so it shouldn't be an issue
Got it thanks man
Note that for Hackathon it's required using cloud (1.1.2 without relationships)
In fact, it's probably the best approach creating a separate collection for users in most cases, since that way you can handle permissions
Recommended threads
- Usage of the new Client() and dealing wi...
Hey guys, just a quick one - we had some web traffic the other day and it ended up bombing out - To put in perspective of how the app works, we have a Nuxt Ap...
- Cloud function deploy stucks in processi...
Been trying for the last hours to deploy my function but for whatever reason, alwasy stuck on processing!
- Increase by operators
I see appwrite have bunch of useful operators for querieng db. One more I would like to suggest is operators like increase the count of a int columns by 1,2.. ...