Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 090-nextjs.mdx #6711

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update 090-nextjs.mdx #6711

wants to merge 1 commit into from

Conversation

Levix0501
Copy link

No description provided.

@ankur-arch
Copy link
Contributor

Hey @Levix0501 👋 , thanks for opening the PR.

Could you add a description to specify why this change is necessary?

@Levix0501
Copy link
Author

Hey @Levix0501 👋 , thanks for opening the PR.

Could you add a description to specify why this change is necessary?

Thanks for your review!

The original code assigns the created PrismaClient instance to globalForPrisma.prisma in development mode but never actually reads from it. This means that on every import, a new PrismaClient instance is still being created, which can lead to multiple database connections in Next.js development mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants