Reverse links typescript
Hi there. I'm wondering if it's possible to
I've had a look at https://xata.io/blog/navigating-many-to-one and https://xata.io/docs/concepts/data-model#links-and-relationships but I'm still not sure how to do this.
Schema:
What seems to work is:
However,
read a ShoppingCart by it's id and also get all it's ShoppingCartLineItems in one query. I'm trying to avoid making multiple queries to the database.I've had a look at https://xata.io/blog/navigating-many-to-one and https://xata.io/docs/concepts/data-model#links-and-relationships but I'm still not sure how to do this.
Schema:
What seems to work is:
However,
record doesn't have a lineItems prop. Addressing the N+1 problem and navigating one-to-many relationships with Xata's new approach.

