
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
- Documents deleted in bulk API don't trig...
I have a function that is triggered when a document is deleted databases.x.collections.x.documents.*.delete. When I delete documents using the deleteDocuments ...
- Can't create documents. ID already exist...
- 500 Internal Server Error
please help i cant access the database due to this error
