How does Appwrite behave in cyclic dependencies?
Consider following (is for multi tenant): Customer(User, Address, Shop) Shop(List<Customer>) Order(Customer, Shop)
What is the output, if I create a Order and fetch it afterwards.
In my case, I think in the nested json there is the data missing (otherwise it would create infinity children).
- Am I right?
- How to solve this?
TL;DR
Title: Two-way relationship in Appwrite
Question: How does Appwrite handle cyclic dependencies?
Example: Customer-Shop-Order relationship
TL;DR: When creating an Order and fetching it afterwards, the nested JSON may be missing data due to cyclic dependencies.
1. Correct, the data may be missing in the nested JSON to avoid creating infinite children.
2. To solve this, you can manually fetch the related data using Appwrite's data fetching methods or adjust the data structure to avoid cyclic dependencies.Recommended threads
- Functions Problem
Whenever I run my AI Generate through Appwrite Functions, I am getting this Call Stack AIService.generateServer (src\services\ai\gemini.ts) next (<native>) ...
- Couldnt not do appwrite push tables
Not sure why i am not able to create my tables
- Frequent 500 Internal Server Errors - Pr...
PROJECT ID: 6951f2xxxxx1ee9e750a REGION: Singapore (sgp.cloud.appwrite.io) PLAN: Pro Our production application experiences **500 Internal Server Errors** mult...