#Using where with relations

1 messages · Page 1 of 1 (latest)

foggy ice
#

Hey, im trying to do some nested queries but struggling a little.

In this example I only want to return values where the related value has the value shown.

Is this type of query possible in Prisma?

where: { AND: [ { organization_id: request.organisation.id, }, { AND: [ { organization_profile_marketing_events: { every: { opens: { gte: 1, }, }, }, }, { organization_profile_transaction: { every: { penny_value: { gte: 9000, }, }, }, }, ], }, ], },

vestal depot
foggy ice
#

this just returns the results of find many with empty values in those joined tables