Hi everyone. I'm having one problem with writing `...
# orm-help
s
Hi everyone. I'm having one problem with writing
whereInput
. what i want to do is comparing two field in whereInput. there are showMessageDateA(type DATE), updatedAt(type Date), So I wanna get data that it's updatedAt greater than it's showMessageDateA I don't know if it is possible So.. could you please let me if it is possible.. and how the thing work please look at line 14 thank you
r
Hey @SEHYEOK 👋 Currently it's not possible in Prisma Client to compare two fields of the DB, but as a workaround, you can use
prisma.raw
as follows:
Copy code
prisma.raw`select * from "Rooms" where updated_at > showMessageDateA`
Something like this depending on your model.
s
thank you for your comment @Ryan! i didn't know about
prisma.raw
and maybe i can make it by using it. i appreciate your help! :) ``` ```
👍 1