Hey Is there any way to perform this query? I hav...
# orm-help
j
Hey Is there any way to perform this query? I have seen atomic operations on the update, does that exist on findMany?
Copy code
await prisma.offers.findMany({
        where: {
            status: {
                lt: offers.statusValue //based on any other field on that table
            }
        }
    })
r
@Jijin P Atomic number operations is only for updating values. For
findMany
you can use operators like
lt
and
gt
to compare against a value.
But you need a static value. You currently cannot query based on any other field on the table.
j
Ok. 😊
r
For querying against the values on a field, you can use a raw query via
prisma.$queryRaw
as a workaround 🙂
👍 1
j
Let me check that.
💯 1