Gustav Ahlberg
04/26/2021, 12:52 PM*ScalarFieldEnum but I'm thinking it might be an easier way to get it programmatically?
My use case is that in a middleware I want to rewrite a where statement to search in another field if it exists.
prisma.model.findFirst({ where: firstName: 'max' })
but I want to rewrite that to
prisma.model.findFirst({ where: firstName_hash: 'HASH OF FIRSTNAME' })
iff the firstName_hash field exists?