Hey guys, I'm having another issue with JOINs tha...
# community-help
d
Hey guys, I'm having another issue with JOINs that I can't solve myself. Would appreciate some help here. So I have a
profile
document which I want to join
orders
and orders should include the relation
products
. Did the references and so far it is working. However when trying to include the
products
something strange happens with my result. When using the include on
products
it merges the fields of profil into each of the products and I'm losing the top level data there. I still want to keep the profile data outside the orders.
Copy code
filter_by: $orders(year:=2024),
include_fields: $orders(*, $products(*))
without using the inner include
$products(*)
the profile data remains at its place. I tried to work with the strategy but didn't find a solution so far. Thanks in advance!