3 ms·
In NodeJS Prisma is really good for just building statically typed CRUD-like queries. It gives you result types inferred from the schema so you're less likely t
by cjdell 5y ago
In NodeJS Prisma is really good for just building statically typed CRUD-like queries. It gives you result types inferred from the schema so you're less likely to make mistakes.
Would still use real SQL for serious stuff, but in my experience most queries are CRUD anyway so I don't see lightweight ORMs as a problem as long as they're not doing magic caching in the background and lazy fetching. Let me decide how I want to do that.
- topicseed 5y agoUsing MikroORM in NodeJS and works wonders. Has the "raw" option for queries I want to handle myself, or even the "knex" builder for something in between
- cjdell 5y agoHmm... Looks like a "active record" pattern (like Hibernate). This is exactly what I don't want. Essentially I only use ORMs as query builders. No magic behinds the scenes.
- topicseed 5y agoAuthor said it isn't[0] a year ago but not sure. I think it allows a couple of strategies to be used. [0] https://github.com/mikro-orm/mikro-orm/issues/403 https://github.com/mikro-orm/mikro-orm/issues/403