
I'm creating a food ordering website for businesses.
I'm having issues with the relations on my database
I attached the attributes for the collections I'm having issues with. I've mostly worked with non relational databases like mongo but I believe I'm using the correct "standards" for this kind of database (correct me if I'm wrong)
APP CONTEXT/ BACKGROUND
- Each user can be either be a System Admin, Restaurant, Business, or Worker
- When I want to grab the Restaurant from a user I just get the logged user and travel through its contents made by the relations to get the Restaurant it owns and then get the orders of that restaurant. (Maybe this is a bad practice idk)
- When I try and display that info on the console I'm not getting the Restaurant the order belongs to and neither the Business that made the order, even though they are on my attributes and my schema
Attached the result of my console log at the end

Is it ok for me to just store the Business and Restaurant name in the order or is that bad in the long term?
Recommended threads
- Help with 409 Error on Relationship Setu...
I ran into a 409 document_already_exists issue. with AppWrite so I tried to debug. Here's what I've set up: Collection A has 3 attributes and a two-way 1-to-m...
- Database Double Requesting Error.
I am getting error for creating new document in an collection with new ID.unique() then too getting error of existing document. When button is pressed one docum...
- JSON and Object Support in Collection do...
I am working with Next.Js and Appwrite Cloud, I am relatively New to Appwrite but i have noticed there is no direct support of JSON and Object support in attrib...
