is there an easy way to access the generated schem...
# orm-help
g
is there an easy way to access the generated schema from prisma? I have found
*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.
Copy code
prisma.model.findFirst({ where: firstName: 'max' })
but I want to rewrite that to
Copy code
prisma.model.findFirst({ where: firstName_hash: 'HASH OF FIRSTNAME' })
iff the
firstName_hash
field exists?
🍿 1