Better HN
topnewbestaskshowjobs
Log inSign up

hervelabas

2 karma · joined Jun 26, 2020 (6y ago) · 4 submissions

Product Manager
Submissions

comment 6y ago · link · parent

Not yet indeed. Prisma doesn't support long running transactions and advocates for alternative ways. We're preparing a post on the topic soon, and will improve the means for those alternatives.

comment 6y ago · link · parent

> They can be compared in terms of who dictates the model/is the leading source of truth.

You can also use introspection to keep the database as the source of truth for the model, and lean on the Prisma schema for type safety if you prefer.

comment 6y ago · link · parent

> My first instinct was to say type safety, but you don't really get that with JS either way.

You get type safety if using it with TypeScript though: this is where Prisma adds a lot of value. Compile-time warnings, ease of refactoring...

comment 6y ago · link · parent

Prisma is a Query Builder, not an ORM (like Objection). We chose this approach since ORM suffer from the object-relational impedance mismatch problem (described here: https://en.wikipedia.org/wiki/Object-relational_impedance_mi...) We explain this in more details here: https://www.prisma.io/docs/understand-prisma/why-prisma#orms... or there: https://dataguide.prisma.io/types/relational/comparing-sql-q...