Flutter Developer
Hey there,
thanks for reading this Q&A and trying to help!
Currently trying to develop a Fleet/Event Management application.
For this there exists some domain entities which I am unsure how to properly model.
Basically there is an entity called "Event" and an "Order".
An events contains e.g. an title, a short description about the event etc.
Orders on the other hand contain information about what items are needed for that event and combines these items with a specific car.
So I have a relationship between an Event, which can contain many orders, and the other way around (an Order is related to an event).
I used Appwrite relationships to realize this (one-to-many, bidirectional).
When fetching an Event, I get a list of bookings but obviously the "event" property of these bookings is not present/null. And the other way around - when fetching an order, the event's bookings dont contain the fetched order. From database/api level this make sense because otherwise we would have an endless loop but how should I define my models then?