awesome-nest-boilerplate icon indicating copy to clipboard operation
awesome-nest-boilerplate copied to clipboard

Investigate MikroOrm

Open NarHakobyan opened this issue 2 years ago • 6 comments

https://docs.nestjs.com/recipes/mikroorm

NarHakobyan avatar May 26 '22 10:05 NarHakobyan

take a look at the https://docs.nestjs.com/recipes/prisma I was planning to create a fork of your boilerplate with prisma

https://www.prisma.io/docs/concepts/more/comparisons/prisma-and-typeorm

vanenshi avatar Jun 23 '22 09:06 vanenshi

Hi @vanenshi, Thanks for your suggestion, I'm not familiar with prisma, could you please guide how to use it for complex queries like using subqueries, postgres triggers, and write custom sql code.

NarHakobyan avatar Jun 23 '22 13:06 NarHakobyan

In my little experience Prisma is great for small projects (blog, simple services, etc), it's also a great solution inside NeXtjs if you use it as small backend, but for complex solutions it's not very handy. Maintaining a large number of entities in one file becomes very difficult.

Mikrorm is similar to TypeORM though and you can use the same development principles in Nestjs as with TypeORM, so migration should not be very difficult. So I think it's a good choice

JustDenP avatar Jun 23 '22 20:06 JustDenP

@JustDenP Thanks.

NarHakobyan avatar Jun 23 '22 21:06 NarHakobyan

@JustDenP Thanks denis I guess I'll try mikroOrm

vanenshi avatar Jun 24 '22 07:06 vanenshi

Guys, you can follow the migration progress in this PR https://github.com/NarHakobyan/awesome-nest-boilerplate/pull/277

NarHakobyan avatar Jul 11 '22 15:07 NarHakobyan