findMany where first/latest of 1:n relation meets certain condition

I can't seem to find a solution to this problem: I would like to do a findMany query and get only those entries whose first (latest) relation of many (1:n) meets a condition, eg. a field equals to some value. I'm using latest Prisma with Postgres. Is this not possible? Should I do a rawQuery? Thanks
1 Reply
riccardolardi
riccardolardiOP4mo ago
Bump... pseudo code could look like this:
{
where: {
myRelation: {
first: {
myField: {
equals: "some value"
}
}
}
}
{
where: {
myRelation: {
first: {
myField: {
equals: "some value"
}
}
}
}
Want results from more Discord servers?
Add your server