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
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...
- Edit ID of an existing collection
Hi there. Is it possible to edit an ID of an existing collection? Right now it looks impossible from AppWrite cloud at least.