I’ve followed the official documentation(https://www.prisma.io/docs/orm/prisma-schema/data-model/views) of Prisma in order to fetch data from a view.
If I use $queryraw i’m able to fetch the data but when i use the client like: prisma.BalanceTransacionView.findMany() it states that the The table public.BalanceTransactionView does not exist in the current database.
I’ve added the view to the prisma.schema and run prisma generate so I can use the prisma client to the new generated view but when i deploy it it just gives the error above.
view BalanceTransactionView {
id String @unique
etc...
}
I suspect that I’m missing a step to make it available when i deploy it but i didn’t create a migration so didn’t want to create a migration unnecessarily.
If you can through some light into it could be very nice 🙂
Thanks!