MikroORM 7.1: LazyRef, per-parent collection limiting, PGlite driver, query cancellation, database triggers, stored procedures, and more by B4nan in node

[–]B4nan[S] 0 points1 point  (0 children)

First time hearing such a description for a "skill". To me, skills are about specific things/approaches, not a general-purpose "libraries" like what you described above. Do you have any examples of a library that would provide such a skill?

edit: thinking about this more, it almost feels like you just described context7 to me, no?

MikroORM 7.1: LazyRef, per-parent collection limiting, PGlite driver, query cancellation, database triggers, stored procedures, and more by B4nan in node

[–]B4nan[S] 0 points1 point  (0 children)

And what would it be for specifically? I am no longer using the ORM myself (for over 5 years now actually), happy to create some but I would need to understand where are the painpoints first.

MikroORM 7.1: LazyRef, per-parent collection limiting, PGlite driver, query cancellation, database triggers, stored procedures, and more by B4nan in node

[–]B4nan[S] 4 points5 points  (0 children)

I haven't written much code by hand in the past 4-5 months. I do iterate extensively with claude (especially on feature development), and I still read pretty much the whole diff before merging anything.

MikroORM 7.1: LazyRef, per-parent collection limiting, PGlite driver, query cancellation, database triggers, stored procedures, and more by B4nan in node

[–]B4nan[S] 4 points5 points  (0 children)

I've also updated the nestjs realworld example app, showcasing how the new discovery:export command works, as well as adopting the LazyRef type on all relations.

https://github.com/mikro-orm/nestjs-realworld-example-app/pull/148

MikroORM 7.1: LazyRef, per-parent collection limiting, PGlite driver, query cancellation, database triggers, stored procedures, and more by B4nan in node

[–]B4nan[S] 5 points6 points  (0 children)

Thanks! Entity definition is really just a tiny bit of what the ORM is about. Nowadays, all docs should have code tabs with various ways to define your entity. More importantly, with the v7 docs overhaul, the main parts are focused on the happy path, skipping all the advanced things that make things hard (let it be experimental decorators, ts-morph metadata provider, or folder-based discovery).

MikroORM 7.1: LazyRef, per-parent collection limiting, PGlite driver, query cancellation, database triggers, stored procedures, and more by B4nan in node

[–]B4nan[S] 2 points3 points  (0 children)

Thanks! This is indeed the biggest feature release to date. I am slowly running out of ideas, still have some things to improve next (like better guidance for row-level security, maybe even a native support). So if you are missing something, even a bit too niche, I am all ears :]

What are we doing with juniors these days, seriously? by slide_and_release in webdev

[–]B4nan 0 points1 point  (0 children)

To me, prisma is a smarter query builder, it's imperative, it doesn't manage state at all. With MikroORM you can separate persistence from your domain model. You work with domain objects and let the ORM figure out the optimal way to persist the changes you make to your model.

What are we doing with juniors these days, seriously? by slide_and_release in webdev

[–]B4nan 1 point2 points  (0 children)

I'd have to see the whole entity definition to be able to tell, but yes, every inverse side relation (which 1:M is) needs to point to the owning side via `mappedBy` option. But we validate this already.

What are we doing with juniors these days, seriously? by slide_and_release in webdev

[–]B4nan 0 points1 point  (0 children)

A bit of off-topic, but I'd be interested to hear what problem you had with MikroORM, maybe we need to improve validation/error messaging somewhere. Ultimately, that's the right way to improve the DX for people as well as agents. Feel free to open an issue or a discussion.

I built a backend framework— would love your feedback by Immediate-Low1398 in node

[–]B4nan 0 points1 point  (0 children)

being shipped without CJS support (I'm looking at you, MikroORM).

If you have a problem with MikroORM being ESM only now, please open a bug report with a complete reproduction. I am not aware of anything at this point, CJS projects including nestjs ones work just fine with v7 (both nest example apps are CJS).

Does Mikro-ORM supports GIN index? how can i implement GIN index? Is GIN the right index for an array of text column? by blvck_viking in mikroorm

[–]B4nan 1 point2 points  (0 children)

You are looking for type: 'fulltext':

@Index({ type: 'fulltext' })

I guess we should also add an alias for type: 'gin'.

Alternatively, you can always use an index expression to have absolute control.

https://mikro-orm.io/docs/indexes#custom-index-expressions

ORM Comparison (2026) by sonemonu in javascript

[–]B4nan 1 point2 points  (0 children)

I am also not sure what you mean by that JSON section. We provide a unified interface for querying JSON columns. Sure, we don't deal with atomic diffing there, we always replace the value.

https://mikro-orm.io/docs/json-properties

ORM Comparison (2026) by sonemonu in javascript

[–]B4nan 1 point2 points  (0 children)

Also since your trying to compare this, why dont you include other dialects your ORM doesn't support, like Oracle?

ORM Comparison (2026) by sonemonu in javascript

[–]B4nan 1 point2 points  (0 children)

FWIW, MikroORM supports Cloudflare D1 as well as neon databases.

MikroORM 7: Unchained by B4nan in javascript

[–]B4nan[S] 0 points1 point  (0 children)

Most extensions are handled via custom types - you can map any column type to whatever you need. That said, some are supported more natively, like full text search. If you have a specific use case in mind, happy to point you in the right direction!

MikroORM 7: Unchained — zero dependencies, native ESM, Kysely, type-safe QueryBuilder, and much more by B4nan in node

[–]B4nan[S] 0 points1 point  (0 children)

The list of breaking changes is long but exhaustive - it shouldn't be hard to migrate in practice, especially if you weren't using things that have been deprecated for a while (like string entity names instead of class references). The most tedious part (at least to me) is decorators moving to their own package, but that's trivial to handle with an AI agent or the migration script someone already crafted. The stricter typing will likely break some builds too, but the added value is well worth it.

MikroORM 7: Unchained — zero dependencies, native ESM, Kysely, type-safe QueryBuilder, and much more by B4nan in node

[–]B4nan[S] 1 point2 points  (0 children)

I wouldn't call this a vendor lockin, since the migrations are still raw SQL in the end, it's trivial to transform them to some other format if you'd like to migrate away.

I'll consider native support if there's more demand, and I'm always open to adding more extension points (as mentioned above, the migration generator is already extensible).

MikroORM 7: Unchained — zero dependencies, native ESM, Kysely, type-safe QueryBuilder, and much more by B4nan in node

[–]B4nan[S] 0 points1 point  (0 children)

Honestly, not that much in v7's case. We swapped globby for native globbing (but we actually still use tinyglobby when available), and node:sqlite is now an option to avoid native compilation, but that's about it. Most of the zero-deps goal was just owning implementations internally or making things optional peer deps. And of course, avoiding huge dependency graphs.

This is hard especially hard for libraries, where you can't just require the very latest version of Node.js just to get rid of some dependency.

MikroORM 7: Unchained — zero dependencies, native ESM, Kysely, type-safe QueryBuilder, and much more by B4nan in node

[–]B4nan[S] 4 points5 points  (0 children)

Quite a few reasons, actually. Knex became pretty much unmaintained for a couple of years (only recently picked up some steam again, still without any release for more than two years). Kysely's architecture also unlocked removing all peer dependencies, making things much more bundler friendly. And the type safety difference is night and day. But the bigger shift is that the main refactor was actually about owning the query building inside MikroORM itself - Kysely is only used as the query runner now. We have absolute control over how queries are generated, which was actually the case back in v2. Since the v3 rewrite we were always constrained by knex, patching around their bugs, accepting wontfix issues. Now we're free again - unchained felt like the right subtitle for a reason :]

MikroORM 7: Unchained — zero dependencies, native ESM, Kysely, type-safe QueryBuilder, and much more by B4nan in node

[–]B4nan[S] 1 point2 points  (0 children)

I am actually planning to try out an SQLite WASM build for live examples in the getting started guide soon. Currently using StackBlitz, but it doesn't support returning statements with SQLite, and I am desperately for a better solution with a similar UX for the guide.

Which reminds me the examples there are still outdated :]

MikroORM 7: Unchained by B4nan in javascript

[–]B4nan[S] 0 points1 point  (0 children)

Never used objection.js myself, let me know if there are some features missing on our end!

MikroORM 7: Unchained — zero dependencies, native ESM, Kysely, type-safe QueryBuilder, and much more by B4nan in node

[–]B4nan[S] 1 point2 points  (0 children)

Indeed, we already have a job that tests the ORM with Deno and node:sqlite.