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
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Relation Question
How do I create a relation from table y to an others x.$id. in my example I have a users table where I use Appwrites unique User IDs and I want other tables fo...
- Unknown attribute type: varchar / text
Since the `string` type is deprecated I tried using `varchar` and `text` in some newer tables, but when running `appwrite pull tables && appwrite types ./src/li...