Prisma

P

Prisma

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

Join

I encountered an issue where the database operation in Prisma results in an indefinite wait time.

Hi Everyone I am stuck in a issue. I have build project in NestJS, GraphQL using Prisma ORM (PostgreSQL). On my ec2 machine, the database query goes into infinite loop, when I check in my playground, it is still loading, response not coming from the database server. When I check my same connection using my database client (DBeaver) it is working I can fetch the records there. But it is stucked on my server. When I check my rds logs, I can see one line "could not receive data from client: Connection reset by peer" Don't know why I getting this kind of issue, I didn't face this issue in any of project. I checked the RDS, the CPU utilization is normal is upto 6% and active connection is between is 5 to 10. Anyone can tell me what is the exact issue....

Prisma Pulse for Microsoft SQL Server

Is there any roadmap for offering Prisma Pulse for Microsoft SQL Server? Thanks!...

Read Only database

Hello my application is build with blitzjs. I'm having trouble using the read replica with enhancePrisma(PrismaClient) because it doesn't expose extends method and I use it because thats how blitz integrates with prisma and I get an error when trying to just use PrismaClient()...So my goal is to have my main write database and read only database for certain queries. I wanted to know if there is another way to use read only databases than read replicas?

Multiple Prisma

Hi, I'd like to know if I can define a schema.prisma file for a specific instance? I'd like to be able to manage a relational database and an sqlite database....

Asynchronous event processing?

Pulse sounds great, but from what I understand, you must be actively streaming events to be able to react to them. This makes it a poor option for tasks like sending onboarding emails, even though that's an example often used in the documentation. It would be great to have native integrations with tools like Inngest to enable type-safe asynchronous event processing.

Query fields on an object

Given my prisma schema: ``` enum PointType { Point }...

Accelerate: I cannot put my MongoDB connection string

As I wanted to put my MongoDB conection string in accelerate to initiate a new project, it's always telling me that my string is wrong and im definitely sure that my string is right
No description

Type instantiation is excessively deep and possibly infinite

when i use prisma extension, i get this kind of error on my ide, omg we have exceed the limitation of typescript, what can be done? #typescript...

How do I define type of returned object based on selected fields?

I have a function that fetches a client and optionally only selects some of the client props: ``` // Example implementation of clientSelect const clientSelect = {...

Prisma relations

what's wrong with my relations? when i delete a Product, the FileData gets deleted but not the ServerData "prisma": "^5.17.0",...
Solution:
Product and ServerData both are parent of FileData if any parent is deleted the child also deleted deleting child does not delete parant...
No description

Migration engine exited. Error: Command failed with UNKNOWN:

Everything was perfectly working until this morning, I got this error when I tried to db push, if anyone could help me out with this, that'd be great
No description

Prisma & Supbase

Hello, im using Prisma for a NestJS REST project and im having some struggle with the connection pool. I enabled and exported the metrics related to prisma queries and performance and theres a scenario where randomly the open connections suddenly drop (screenshot at the bottom) Im currently using an Supabase XL instance: ```yaml...
No description

Invalid date

Hello everyone, I have an error invalid date with prisma. Can you help me, please ?...

Why Prisma over e.g. Knex for tests?

Hi, I just joined a new company where most seniors have left the company so I can't ask them the "whys"? The whole project uses Knex for Querying the Database, but for some tests, where we use a temporary MySQL Docker instance, we use Prisma for everything. Remind you that our project is quite massive (7 years old, 10 Fulltime developers throughout that time). So, why would we use Prisma, a new SQL library and a new abstraction layer to maintain, instead of Knex for this which IMHO should have everything? I couldn't find any resource on this, but it seems that Prisma is one of the few that have some documentation on tests with Databases, which makes me believe that might be the reason?...

Issue creating a record in an edge table

The function createCompanyAdmin worked a month ago when I initially wrote it, but I haven't needed it until today when I finally got that far in my UI. I had to refactor the endpoint to take form-data instead of just a json body, but didn't have to change anything db wise. I'm confused as to why it seems to be trying to create a Company, and yes the Company is in the database. ```...
Solution:
Try this? ```ts db.companyAdmin.create({ data: { Company: {...
No description

[Prisma][MongoDB][Lucia] Malformed objectID

Hi, Im getting very frustrated with the issue Im getting. I was running google oauth on SQLite, but just remapped into MongoDB. I dont know if its Lucia or Prisma... But Im getting this error: ```Inconsistent column data: Malformed ObjectID: invalid character 't' was found at index 0 in the provided hex string: "t6d6pgyzluujpbeawuees2f6e6j66el62n43fmd3" for the field 'id'. .... { code: 'P2023', clientVersion: '5.17.0',...

how many connections do bulk queries eat up?

hi, is it safe to assume that since bulk queries are done in a transaction, that only one db connection will be taken up by the query? (as opposed to, for example, doing a bunch of individual inserts and promise.all'ing them). https://www.prisma.io/docs/orm/prisma-client/queries/query-optimization-performance#using-bulk-queries...

transaction hangs when doing async work in $extends

``` if (modelsListener.includes(model) && operationWouldChangeData(operation)) { return handleModelChanged(prisma, model, operation, args, query); } else { return query(args); }...

self-relation

Greetings! I am from Colombia. I was reading the doc on self-relations and I have a problem regarding the interpretation of the relationships or rather the fields that are generated from them. ``` model User { id Int @id @default(autoincrement()) name String?...
No description