Hello !
I am currently trying to develop a mobile shop application using flutter and appwrite, and have come across a problem when trying to adapt my data model (image 1) to appwrite's database system.
To do so, I have tried using appwrite's relationship system (image 2). In this case, I have a one to many relation from sale to product, and from product to sale.
However, this solution leaves no room for historisation of the data when the sale is made. Say I add a new stock to a product in the sale with a different buy_price , it doesn't look like I can know which stock was involved when the sale was created?
Would anyone be able to offer a solution to my problem, or clarify the situation if I am misunderstanding how relationships work? Thanks a lot! :terraLike:
Recommended threads
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...