6.5.0 (2025-08-27)
https://mikro-orm.io/blog/mikro-orm-6-5-released
Bug Fixes
- core: allow querying embeddables for
null
values via collection operators (d7b25a7), closes #6736 - core: do not fail version mismatch checks when getting the current version fails (086d767), closes #6765
- core: do not propagate changes to collections when partially loaded (7068b35), closes #6732 #6734
- core: ensure
em.transactional
context propagation won't result in breaking identity map (2b608fc), closes #6764 - core: ensure correct runtime value of
decimal
andfloat
properties (#6807) (7cd8b1c), closes #6806 #6806 - core: fix extra updates after
em.refresh
on nested entities with embeddables (640985c), closes #6705 - core: fix fetching of autoincrement PK when upserting without a unique value (0dccac7), closes #6755
- core: fix hydration with select-in strategy and PKs with custom types (#6808) (4770462), closes #6726
- core: fix querying by a nested FK as PK (c2c5bfd)
- core: hydrate persisted getters without setters unless explicitly disabled (459329a), closes #6723
- core: ignore properties with
hydrate: false
from change tracking (4a6fb9b), closes #6723 - core: improve detection of empty flush (6debac9)
- core: respect joined filters in
em.count
(323ffef), closes #6666 - core: respect logger context in queries from
flush
and others (#6777) (083a1ee), closes #6776 - core: support cursor based pagination with
ScalarReference
properties (84d20b1), closes #6793 - core: use
default
for missing values in multi insert for custom types (eae635f), closes #6727 - postgres: quote string array values with
''
instead of\'
(4bc1c9e) - postgres: support
primary key
with generated identity columns (382d5b3), closes #6693 - query-builder: fix
qb.leftJoinAndSelect
with a subquery on M:N relations (aa52abb) - query-builder: fix hydrating 1:1 inverse side via joined strategy (d48359c)
- query-builder: support group operators inside join conditions (#6796) (efe5a56), closes #6795
- reflection: unwrap
runtimeType
to support correct hydration of scalar references (ff6a7ae), closes #5557 - reflection: unwrap
ScalarRef<T>
andEntityRef<T>
type (6b1a349), closes #5557 - schema: properly handle array defaults in mysql (#6703) (534193c), closes #6688
- sql: correctly handle lazy scalar properties with custom types (#6715) (c8add75)
- sql: fix computing
order by
clause when ordering by a not populated relation (b8a7984), closes #6757
Features
- core: add
balanced
loading strategy (#6787) (a7bff86), closes #6129 - core: add
loadOrFail
toScalarReference
wrapper (#6716) (dcff19f) - core: add
RequiredNullable
helper type (#6756) (71f5153), closes /github.com/mikro-orm/mikro-orm/discussions/6744#discussioncomment-13766303 - core: add comprehensive transaction propagation support (#6802) (19ebac4), closes #6788
- core: allow defining entities with inferred interfaces (#6253) (1e6961a), closes #6242
- core: allow triggering
onCreate
hooks duringem.create
(#6263) (1a2cc2e) - core: support
contextName
in@Transactional
decorator (#6719) (9ce9499) - schema: allow disabling foreign key constraint creation, per relation (#6702) (79e6cb0), closes /github.com/mikro-orm/mikro-orm/issues/2548#issuecomment-2765607556
- schema: allow wilcard-schema friendly index expression (#6706) (688043a), closes #6446
- sql: refactor handling of filters on relations (2d1b889), closes #6760 #6784