Prisma

P

Prisma

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

Join

Record has changed since last read in table

{ code: 1020, message: "Record has changed since last read in table 'daemon'", state: "HY000" } I get this error once every couple of seconds. I don't really understand why. sure, it might be changed since I read it but I don't care? I'm not sure how to fix...

caching

Ciao, i want to cache the result of a query. What I didn't understand is if the cache works per query parameter. I mean, if I cache user table data for userId=1, if i run a query with userId=2, the second query has a different cache and the output is "where" based?

React strict mode MongoDB race condition

I'm using MongoDB Atlas through Prisma on my Express backend while my frontend uses React & Vite. When I do fetch requests in React they get sent twice because of strict mode. This causes a race condition that creates duplicate documents on creation even when using unique fields in a document. Any smart way to fix this? I know that I can just skip strict mode which decreases chances of simultaneous requests. But even without strict mode I don't like the possibility of an end user being able to create duplicates....

Is this a bad Idea? Transition to Rust Free, Using TS Paths to override old @prisma/client imports

We have 939 files that are importing "@prisma/client".
Ideally we will be refactoring all 939 files for example ``` // import { Prisma, PrismaClient, biz_buz } from "@prisma/client";...

Turborepo x Prisma x Neon

Been stuck trying to implement a prisma database package for my monorepo (turborepo). I am using a neon driver adapter. I dont have any edge functions, besides middleware which just uses clerk. I get this error as soon as any page loads. It is an app router next js app btw that I am trying to use the prisma package in. ⨯ unhandledRejection: Error: dynamically loading WebAssembly is not supported in this runtime and global wasm_packages_database_prisma_generated_client_query_engine_bg_325b988e was not injected...

prisma without rust runs on cloudflare?

does this now runs on cloudflare without accelerate?

How do I update the password for Prisma Console?

I want to update the password I use to access the Prisma Console, but I can't find an option to do so, in the settings there is only an option to update the name and email.

MaxListenersExceededWarning: Possible EventEmitter memory leak detected

I have a test suite (node test) that tests our Prisma data model. Using 6.14 and earlier, everything worked fine. But starting with 6.15 (and still happens in 6.16.1), I started getting this warning in the console: MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit at _addListener (file:///Users/marcus/xsignal/messaging-common/node_modules/@neondatabase/serverless/index.mjs:322:10) at kn.addListener (file:///Users/marcus/xsignal/messaging-common/node_modules/@neondatabase/serverless/index.mjs:325:8)...

What does `Rust Free` mean when I'm still getting Rust panics?

I keep seeing blog posts by prisma claiming they have a rust free engine now, but when I push the edge cases that broke the rust engine, they still break in the rust free version (see #28058). Does rust free just mean rust isn't the one executing the query? Rather than rust also not being involved in generating the query? ...

Consider collaborating with prisma-json-types-generator to support rust-free ORM & ESM generator

With the recent updates to the rust-free ORM and Prisma Client generator, prisma-json-types-generator is no longer compatible. This is blocking us from adopting the new setup, since we rely on strongly typed JSON columns. There’s an open issue that highlights the problem: https://github.com/arthurfiorette/prisma-json-types-generator/issues/542
Right now, it doesn’t reflect very well on Prisma that such a widely used community package is left in limbo without an official response. ...

When using @prisma/adapter-pg, are additional options required for DATABASE_URL?

When using @prisma/adapter-pg, are additional options required for DATABASE_URL? error: User was denied access on the database db-name version 6.16...

When using @prisma/adapter-pg, are additional options required for DATABASE_URL?

When using @prisma/adapter-pg, are additional options required for DATABASE_URL? error: User was denied access on the database db-name version 6.16...

Why do I need to disable cache for prisma generate on turborepo?

I don't get it. Doesn't prisma generate rely only in on the prisma schema? If yes, this should be cached in my opinion. Am I missing anything?

New queryCompiler with postgres adapter in AWS lambda poor performance

I've been following the prisma queryCompiler and now that its been more GA I'm seeing that none of the performance issues have been addressed here. Not sure if nextjs is a first class citizen here but I'm hosting my stuff on serverless framework on AWS lambda functions, and I've seen a huge decrease in performance. At a minimum I'm seeing like 1-2 seconds additional latency. Sometimes even more with just changing the bare mimimum to make this run in the new query compiler ``` generator client { provider = "prisma-client-js"...

Custom output path with prisma-client (esm) in NestJS

Hi i am trying to use prisma-client with esm (rust engine free version) of prisma v6.16.0 // schema.prisma ```prisma generator client {...

Anyone else seeing "The inferred type cannot be named..." errors after 6.16 update?

I was updating our Prisma from 6.15 to 6.16, and decided to try out the new rustfree engine now that its GA. However, upon doing so, almost all of our tRPC routes starts throwing errors: ``` The inferred type of 'X' cannot be named without a reference to '../../node_modules/@spaak/db/generated/client/client'. This is likely not portable. A type annotation is necessary.ts(2742)...

Unable to download engines on Prisma init

Hey hi hello! I'm trying to set up a new project, it's behind a corporate firewall so I expected some issues, but it seems like this might not be accessible, I get an error here: https://prisma-builds.s3-eu-west-1.amazonaws.com/all_commits/1c57fdcd7e44b29b9313256c76699e91c3ac3c43/windows/schema-engine.exe.gz When visiting it in the browser both on the corporate network and off it's showing an access denied message. The init command is coming back with a 403 error as well...

Schema engine error

I've been developing a project with Next, Express, Prisma, PostgerSQL. But there's 'Schema engine error' when I migrate posgresql database. Please help me fix this error....

rust-free engine with accelerate

is anyone using accelerate with rust-free prisma?
Error [PrismaClientValidationError]: Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.
Error [PrismaClientValidationError]: Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.
...

Prisma.validator is gone but docs still have it and not sure the alternative

Docs: https://www.prisma.io/docs/orm/prisma-client/type-safety/prisma-validator PR that removes it: https://github.com/prisma/prisma/pull/28059 What am I supposed to do now? Is there an alternative, this seems to be a breaking change I cannot find discussed in the release notes: https://github.com/prisma/prisma/releases ...