Back

Historisation using relationships

  • 0
  • Databases
OddOrigin
29 Nov, 2024, 14:20

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:

TL;DR
Developers are seeking help regarding historisation using relationships in their mobile shop application. They are trying to adapt their data model to Appwrite's database system but facing issues with historisation of data when a sale is made. They are looking for a solution or clarification on how relationships work in this context.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more