Hi everyone i have a database on appwrite named inventories which have relation with warehouses db like following:
- Two-way relationship
- Realted Collections -> warehouses
- Attribute Key -> warehouse (i name it warehouse)
- Attribute Key -> inventories
- Relation -> Many to Many (not sure if this could be a problem but open to suggestions)
- On deleting a document -> Cascade - delete all related documents
So how my setup is for example if i have "Hoodie" as inventory item i am going to create a row entry for Warehouse 1 and if it is going to Warehouse 2 then i will make another row entry in inventories collection. Open to suggestions on how to achieve an api call like this: const inventories = await databases.listDocuments( PRIVATE_APP_WRITE_DATABASE_ID, PRIVATE_APP_WRITE_INVENTORIES_COLLECTION_ID, [Query.contains('warehouse', [warehouseId])] ); bcoz when i do this it doesnt work and i want to fetch warehouse details in it.
Tech Stack: I am using Sveltekit 2.0 and warehouseId is passed as param as string.
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- 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...