Rank 2: Process
am try to get the content and other things
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 2: Process
am try to get the content and other things
You can create relationships manually
it's more work, but it works just as well.
Rank 2: Process
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
Rank 2: Process
I do front end mostly
Rank 5: Hypervisor
may be if you see the conversation,
https://discord.com/channels/564160730845151244/1110436420667064460/1110437258047279115
Rank 2: Process
alryt
Rank 2: Process
have gone thru d conversion am not getting...
Rank 2: Process
pls can u walk me thru
What's your database structure like?
Rank 2: Process
Goodevening
Rank 2: Process
Admin
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?
Rank 2: Process
@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.
Rank 1: Thread
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
Rank 1: Thread
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
Rank 1: Thread
Got it thanks man
Moderator
Note that for Hackathon it's required using cloud (1.1.2 without relationships)
Moderator
In fact, it's probably the best approach creating a separate collection for users in most cases, since that way you can handle permissions