3 ms·
I have mixed feelings about Prisma. I do think it might be the best general-purpose ORM for relational databases in the Node landscape, and support for Typescri
by hmsimha 5y ago
I have mixed feelings about Prisma. I do think it might be the best general-purpose ORM for relational databases in the Node landscape, and support for Typescript with autogenerated interfaces is amazing. But it seems to fall short in some ways as well (my experience with ORMs in the past is limited to ActiveRecord and Mongoose, both of which I haven't touched in years). I've only been using Prisma for ~2 months, for an internal application on which I'm the sole developer, and I'll keep using it. But given a new project and freedom to choose, there's a very good chance I'd go with another ORM depending on the use case.
One of the things that is most perplexing to me is the inability to autogenerate a seed file from existing data, to reseed a new database. This would be incredibly helpful for testing and working with staging data. For example, we have a staging database and staging server, and want to be able to reseed the database with some data set, but don't want to write all the data inserts by hand. I'm sure there are many ways to avoid doing this (db-specific export/import, scripting the inserts in a loop over a collection of arrays of values which you've curated by hand, or in our case just copying the sqlite db file). Still, Prisma's story around seeding and data fixtures in general currently leaves a lot to be desired.
There have also been many rough edges I've run into around shaping results (getting category names which have been applied to all blog posts by a given user, for example), and applying schema changes, but I'm not willing to rule out user error / inexperience for many of these