2021-10-20
3137
#node
Akshay Kadam
13407
Oct 20, 2021 ⋅ 11 min read

An introduction to Prisma 2

Akshay Kadam Akshay is a creator, computer artist, and micropreneur from Mumbai. Find him on Twitter @deadcoder0904.

Recent posts:

D3 Js Adoption Guide: Overview, Examples, And Alternatives

D3.js adoption guide: Overview, examples, and alternatives

D3.js is a powerful JavaScript library for creating tailored data visualizations. Let’s see why you should use D3.js in your next project.

Eze Sunday
Jan 19, 2024 ⋅ 10 min read
Using Semantic-Release To Automate Releases And Changelogs

Using semantic-release to automate releases and changelogs

Demonstrate how to automate releases and release notes with semantic-release in GitLab.

Sebastian Weber
Jan 18, 2024 ⋅ 10 min read
React Native Push Notifications A Complete How To Guide

React Native push notifications: A complete how-to guide

Learn all about how to implement push notifications in React Native in this ultimate guide and step-by-step tutorial.

Fortune Ikechi
Jan 17, 2024 ⋅ 12 min read
Exploring Effect A Meta State Rxjs Like Framework For Writing Typescript

Exploring Effect, a meta-state RxJS-like framework

The Effect library helps you better handle async code, types in async scenarios, and errors in TypeScript projects. Let’s see how.

Isaac Okoro
Jan 17, 2024 ⋅ 6 min read
View all posts

3 Replies to "An introduction to Prisma 2"

  1. Hi! Does Prisma 2 work fine with MongoDB? Because there is nothing about it in the official docs, neither examples.

  2. This seeder function did not work for me at all.

    First :

    .finally(async () => {
    await prisma.disconnect()
    })

    throws an error, in the current Prisma version. To solve this, run “await prisma.$disconnect()”

    Second, and that is more of my own use case, if you’re creating tables in your db in a loop, don’t use forEach but for .. of loop. My use case:

    for (const entity of entities) {
    await prisma.tableName.create({
    data: entity
    })
    }

    Every row has to be created asynchronously.

Leave a Reply