Prisma

P

Prisma

The official Discord server of Prisma! Find us online at prisma.io

Join

Upsert by Reference ID

Hello, I'm trying to upsert data by reference ID but Prisma reject this action Execution Code ```ts...

Help for Uncaught TypeError: Failed to resolve module specifier ".prisma/client/index-browser".

Hi All, I am from deployment team and our developer is using prisma orm in a project. Previous version of the project was using prisma version 4 and the developer upgrade it to version 5 in his last commit, now the application is facing this issue, Uncaught TypeError: Failed to resolve module specifier ".prisma/client/index-browser". Relative references must start with either "/", "./", or "../". The application is being built and deployed as a docker container. Currently the workaround has been done by making prisma version as 5 and @prisma/client version as 4.16.2. But we need to make it work for prisma 5.17 and @prisma/client 5.17.0. We are using RedwoodJs framework and node version 18.14. Can anyone please advise what steps needed to be followed so i can guide developer team to do the same. Thanks in advance....
No description

Help me out with this pls

I am pretty new to Prisma and I still am unable to debug and solve this prisma code: Error: ``` Error: P1012...

Client Extension - when is query called?

Hi, I am developing a client extension and want to filter data after i have used my query. I.e. I could do the following: ```ts $allModels: { findUnique({args, query}){...

is it possible to have a connect clause within a createMany operation?

i need to do a createMany: { data : { item: connect [ ... as I have many hundreds of thousands of records

Relation field not appearing in model.createMany

```ts //schema: model ProjectPage { id String @id @default(auto()) @map("_id") @db.ObjectId ...
No description

Why methods of a service not working when $use is used?

Hey Prisma community! I'm facing a weird issue when trying to consume any methods of my service which is based on prisma service/client to make operations. For example, when I tried to get all event sessions I got undefined (which I consider as a weird issue/behavior). I'm using NestJs w/ Prisma (as you can see in the attached image). I'm aware of I should use Prisma client extensions because middlewares are deprecated: the reason of described behavior (when commented, methods are working). But, it would be great if I have a deeper explanation....
No description

Prisma is throwing __filename is not defined specifically in SST cron jobs

This is a weird issue, when I'm running prisma through SST's cron job, which I need in order to do database processing tasks, I get an error that says
__filename is not defined
and the cron job fails. I've tried a workaround with ```ts...

Is the preview feature prismaSchemaFolder available for Python yet?

The feature that allows for multiple schema.prisma files

prisma enum types as argument type?

i've got this function: ```ts export async function log(arg1) { // logic...
Solution:
turns out because I was using amonorepo I needed to export * from my prisma db file, and import the type from the package

Log Transports

Is it possible to set up transports for Prisma Client logs? Context: I want to push logs to Grafana Loki using its HTTP endpoint. Here's an example of Pino logger doing it: https://www.npmjs.com/package/pino-loki ...

Using Prisma with Supabase and NuxtJS/Nitro

Are there any examples out there?

PrismaClientInitializationError - Medal awarded for whoever that solves this.

Hello boys and girls, and a big thank you for reading this. I have a website created with react nextjs using prisma orm and cockroachDB as Db and hosted in Vercel. In my logs, I sometimes recieve this error below, but when I go to the page, the page works fine each time.
PrismaClientInitializationError: Invalid prisma.product.findMany() invocation: ...

Prisma optimize showing error page

I accidentally performance tested my api with Optimize on and now i see this
No description

findMany where first/latest of 1:n relation meets certain condition

I can't seem to find a solution to this problem: I would like to do a findMany query and get only those entries whose first (latest) relation of many (1:n) meets a condition, eg. a field equals to some value. I'm using latest Prisma with Postgres. Is this not possible? Should I do a rawQuery? Thanks

General question about the free version of Accelerate

Want to test this in a feature environment but unsure about the expectations once we use up the free limit, what happens? Does the service stop working entirely? Or does it route directly to the db connection without the usage of cache / pooling optimization offered by accelerate TLDR: (Once we use up the free limit, does my app break)...

tabla

in the final packaging of my backend with espress and prisma into using the schema and the sqlite database, both are synchronized but when I try to use my database it tells me that it does not find the table main.Usuario but my table is only called Usuario, maybe this is the error but how do I fix it? ``js PrismaClientKnownRequestError: 0|bundle | Invalid prisma.usuario.findFirst() invocation: 0|bundle | The table main.Usuario` does not exist in the current database....

Hello every one,Add Accelerate to my application with PrismaService class (extend PrismaClient)

Hello every one, I'm having the problem Add Accelerate to my application: PrismaService.ts ...

I have a nested create many query I am getting Unknown argument 'QuestionOptions'

(v5.17.0)CockroachDB , I restarted the application I have removed all migration. I have re-migrated the data again. and push the data. But I'm still having this problem...

Prisma doesn't see .env.development

Hi! I want to seperate my dev and prod env on my NextJS project. NextJS follow this rule by default, next dev use .env.development and next build use .env or .env.production. But Prisma doesn't follow this rule. When I want to migrate/generate prisma-client on my test env, that DB URLs located at .env.development, Prisma always use .env, and tries to connect prod database. My package.json file scripts look like that:...