Nested queries with mongodb not working.
Hi guys,
I have run into a roadblock in my project where I need to fetch some data via my search operation.
I have the following relations setup:
Product - Variants: 1-many
Variant - InventoryItems: 1-many
in searching InventoryItems I want to query the title of the nested variants - product.
It seems that this kind of nested query is way too complicated for prisma or my indexes/relations are set up incorrectly.
here is an example of a working query...
But if we switch this to a findMany .. we get a timeout!
Nesting further into the variants connected product modal we are also met with nothing but a timeout.
for context I have 9769 InventoryItems ,1590 products and 14989 Variants.
I have also attached images.
any help would be much appreciated.
I have run into a roadblock in my project where I need to fetch some data via my search operation.
I have the following relations setup:
Product - Variants: 1-many
Variant - InventoryItems: 1-many
in searching InventoryItems I want to query the title of the nested variants - product.
It seems that this kind of nested query is way too complicated for prisma or my indexes/relations are set up incorrectly.
here is an example of a working query...
But if we switch this to a findMany .. we get a timeout!
Nesting further into the variants connected product modal we are also met with nothing but a timeout.
for context I have 9769 InventoryItems ,1590 products and 14989 Variants.
I have also attached images.
any help would be much appreciated.



