Repository navigation
Releases
Releases · mikro-orm/mikro-orm
v7.2.12
7.2.12 (2026-11-25)
Bug Fixes
- cli: respect
.mjsand.cjsoutput paths inmikro-orm compile(#8795) (7fd773e) - core: accept fractional seconds in TimeType (#8759) (62aea84)
- core: keep TPT parent tables first with a self-reference on the root (#8804) (33f4e66), closes #8422
- core: keep unflushed inverse 1:1 changes when the relation is populated again (#8817) (314960d), closes #8692 #8814
- core: persist extra updates of TPT parent table properties (#8803) (b264d54), closes #8801
- core: scope relation
filtersoverride to the relation and its nested joins (#8809) (e8d31d1), closes #8807 - core: separate a negative parameter from a preceding minus (#8819) (8d1aa51)
- core: track hydration-time propagation explicitly instead of via shared hydrator state (#8822) (4bed003), closes #8816 #8816 #8815
- core: update related entities with falsy primary keys in
assign()(#8806) (d19dc8a), closes #8757 - seeder: generate valid JavaScript for seeders created with
emit: 'js'(#8794) (a93e321)
Performance Improvements
v7.2.11
7.2.11 (2026-11-20)
Bug Fixes
- core: do not replace entity methods with unknown keys in
assign()(#8771) (d411df7) - core: honor the per-call fail handler in
ScalarReference.loadOrFail()(#8767) (3728594), closes #8758 - core: ignore commas inside default values when reading constructor params (#8752) (be50fca)
- core: include filter params in the result cache key of queries loading relations (#8770) (dfedae2)
- core: mark populated collection partial only when the populate filter targets it (#8755) (f882683), closes #8753
- core: reuse identity-map entries with falsy primary keys (#8757) (8a9cc31)
- mssql: quote schema, table and column names in schema helper queries (#8784) (bd0e282)
- mysql: read enum items of tables with a quote in their name (#8779) (4938fee)
- oracle: keep dollar signs followed by digits in values intact (#8782) (da3a550)
- seeder: normalize the seeder name to a valid class identifier in
seeder:create(#8780) (107748d) - sql: handle unusual identifier names in schema introspection (#8783) (b382fd8)
- sql: keep question marks in identifiers and inlined values out of placeholder matching (#8769) (84b4ac6)
- sql: quote every part of dotted identifiers (#8765) (527a554), closes #8760
Performance Improvements
v6.6.19
6.6.19 (2026-11-20)
Bug Fixes
- core: do not replace entity methods with unknown keys in
assign()(#8773) (039b436), closes #8771 - core: include filter params in the result cache key of queries loading relations (#8772) (ba86f48), closes #8770
- sql: reject queries with more placeholders than parameters (#8774) (4a68331), closes #8769
v7.2.10
7.2.10 (2026-11-16)
Bug Fixes
- cli: resolve
MIKRO_ORM_TYPE=mongoto the mongo driver (#8723) (daf5d62) - core: accept numeric strings in
limitandoffsetoptions (#8697) (8693316) - core: do not mark refreshed m:n items with custom types as dirty (#8742) (aabaa17), closes #8739
- core: do not queue auto-flush when loading 1:m collections (#8699) (263b7ed), closes #6982
- core: hydrate formulas typed as number to numbers (#8711) (fb1ad05), closes #8694
- core: keep the CLI's dynamicImportProvider when re-creating Configuration (#8714) (f54d8b6)
- core: keep trailing empty strings in string arrays on non-postgres platforms (#8720) (de1ad6f), closes #8719
- core: keep unflushed collection changes in
em.populate()(#8692) (149a957), closes #8690 - core: match upserted rows by all onConflictFields (#8696) (43943c2), closes #8695 #8294
- core: snapshot merged
targetKeyand polymorphic to-one relations correctly (#8715) (faf7597), closes #8661 - mssql: do not mark string properties with a custom column type as dirty after load (#8747) (b5adf83), closes #8740
- mssql: map date results of joined relations to strings (#8734) (f93338d), closes #8540 #8733
- mssql: validate pooled connections without a query (#8743) (5ca2b66), closes #8741
- postgres: quote array elements that postgres would read differently (#8748) (fab35eb), closes #8730
- postgres: quote the sequence name in setval and nextval when adding autoincrement (#8731) (06d42e4)
Performance Improvements
- core: avoid per-entity sets and repeated property lookups in
toObject()(#8701) (4dd6f2c) - core: cut per-entity allocations when computing change sets (#8707) (111ed44)
- core: mark collections and references on the prototype (#8700) (2e2b1a1)
- core: reset wrapper fields instead of deleting them (#8698) (90373ae)
- core: skip
ensurePropagation()for entities without bidirectional to-one relations (#8702) (137a009), closes #8671 - core: skip the merge cascade for entities freshly mapped via
em.map()(#8708) (5ab8e1d) - core: speed up flushing removed entities (#8709) (e9012dc), closes #8698
- core: trim per-row overhead when reading entities (#8710) (70777a3)
- core: walk only props with
onUpdatehooks when computing update change sets (#8718) (0599484) - sql: precompute joined column aliases and stop deleting them per row (#8704) (21d7c6f)
v7.2.9
7.2.9 (2026-11-12)
Bug Fixes
- cli: resolve TS loaders from the project root (#8669) (1b655f9)
- core: accept
FindOptions<T>typed options in genericfind()wrappers (#8662) (932227e), closes #8655 - core: clean up the serialization context when
toObject()orserialize()throws (#8636) (70ce74e) - core: detect in-place mutations of Date properties on loaded entities (#8675) (2a02c9f), closes #4391
- core: do not propagate STI sibling property checks to other subtypes (#8688) (b0b2303), closes #8687
- core: don't re-query empty inverse 1:1 relations on repeated populate (#8627) (b074921), closes #8624
- core: fill extra columns of a composite FK referencing non-PK target columns (#8646) (14737a2), closes #8641 #8640
- core: keep unrefreshed properties in the snapshot on partial refresh (#8633) (254f21f), closes #8632
- core: mark entities managed when merged via em.merge() (#8666) (1969694)
- core: reject unparseable date strings with ValidationError in assign() (#8658) (092e0ba), closes #8656
- core: reuse managed entity in
findOnewhenfieldsname an inline embeddable (#8626) (6b79fad), closes #8625 - core: store the database value of the FK in the snapshot set during hydration (#8661) (a868c92), closes #8657
- core: treat copies of a custom type instance as the same type in polymorphic embeddables (#8651) (10a0998), closes #8650
- core: write a scalar composite FK value to the column referencing the target PK (#8645) (c9cbb76), closes #8644 #7764 #8640 #8641
- mongo: map property names to field names in the partial index
where(#8635) (1dd8144), closes #7593 - mongo: return the stored version from
em.upsert()andem.upsertMany()(#8623) (3af6998), closes #8620 - mssql: raise the default request timeout to 60s (#8647) (7ac45dc)
- mysql: unescape quotes in introspected check constraint expressions (#8639) (9481b56), closes #8485
- oracledb: keep fractional seconds on datetime values returned via OUT binds (#8621) (0ab4a51)
- postgres: don't diff a check over a list of values as an enum (#8653) (64bd76a), closes #8652
- schema: do not diff enum items of a non-enum STI discriminator column (#8689) (e972fbd)
- sql: bump the version property when
upsert()updates an existing row (#8620) (303b051) - sql: compare bigint defaults by value (#8631) (4c740be), closes #8132 #8132 #7796
- sql: merge every column of a composite FK on upsert conflict (#8648) (0a2d093), closes #8643 #8642
- sql: reject non-string order directions in
orderBy(#8680) (87baf9b) - sql: run joined
qb.update()andqb.delete()as write queries inexecute()(#8628) (a70a72a) - sql: skip generated columns in
em.clone()andqb.insertFrom()(#8638) (1ec3972)
Performance Improvements
- core: avoid deopt loop when cloning query builder state (#8686) (20ea3cb)
- core: keep scalar properties as plain data properties (#8671) (e312571), closes #6982
- core: skip re-snapshotting entities freshly mapped via em.map() (#8676) (e5e655c)
- core: use Object.keys in getObjectQueryKeys (#8672) (c6c1903)
- postgres: escape string literals in linear time (#8659) (2929460), closes #8001
v6.6.18
6.6.18 (2026-11-12)
Bug Fixes
- core: allow falsy values in concurrency checks (backport to 6.x) (#8524) (28a83f8), closes #8318 #8318
- core: detect changes to decimal strings beyond double precision (backport to 6.x) (#8566) (3a2b4f9), closes #8368 #8368
- core: don't double-wrap
orderByin M:N dataloader batch load (backport to 6.x) (#8563) (ca7d715), closes #8193 #8194 - core: escape entity property names in generated hydration/comparison code (#8453) (193e462), closes #8221 #8221
- core: evict referrers holding a removed entity in their primary key (backport to 6.x) (#8525) (e57f3eb), closes #8203 #8205
- core: keep null custom type values in upsert results (#8429) (a1f0334), closes #8427 #8428
- core: preserve existing groups when lifting relation filters (backport to 6.x) (#8567) (0bf5b96), closes #8304 #8304 #8291
- core: prevent hash collisions for nested composite keys (#8473) (7eb62e2), closes #8088 #8078 #8080 #8082 #8088 #8078 #8082 #8080 #8088 #8078
- core: respect locally disabled transactions during flush (backport to 6.x) (#8568) (80f8f43), closes #8306 #8306
- mssql: use equality conditions for composite PK batch updates (backport to 6.x) (#8543) (9092e73), closes #7442 #7442 #7442
- query-builder: reject arrays as order direction in
orderBy(backport to 6.x) (#8681) (2bc69c1)
v7.2.8
7.2.8 (2026-11-06)
Bug Fixes
- core: apply the entity default
orderByinem.stream()andem.findOne()(#8612) (840bc49), closes #7133 #8503 - core: handle non-JSON query values in result cache and dataloader keys (#8598) (def0462)
- core: include regexp and raw fragment params in result cache keys (#8597) (c4d5e78)
- core: respect FK
deleteRulewhen removing an entity with loaded 1:M collections (#8608) (9dff7c8), closes #8606 - migrations: keep table partitioning in the schema snapshot (#8601) (03f85d8), closes #7816
- mongo: convert
$reinside$elemMatchand keep$rekeys in entity data (#8611) (47ca87b), closes #8599 - mongo: convert
$reon renamed fields, next to other operators and under$not(#8599) (885bed8) - mongo: limit inverse M:N populate per parent instead of per owner array (#8618) (79e817a)
- mssql: handle composite PK
$in/$ninwith an empty list or multiple tuples (#8609) (badc189) - mysql: escape and parse enum items containing quotes or commas (#8614) (cdbc0cb), closes #8554
- sql: keep
$or,$andand$notin the upsert conflict condition (#8602) (19d05e4), closes #8600 - sql: order by a composite relation key in paginated queries and with an alias prefix (#8610) (4b837e4)
- sql: quote index names in
usinghints and validateusingonem.count()(#8613) (35fe690)
Performance Improvements
v7.2.7
7.2.7 (2026-11-04)
Bug Fixes
- core: don't convert a sub-query value with the property's custom type (#8574) (6843a82), closes #8572
- core: don't treat record types as
LazyRef(#8564) (0aeceac) - core: keep class instances by reference when merging the config (#8496) (d11862d), closes #8495
- core: respect the entity default
orderByinem.findByCursor()(#8503) (8d789d8), closes #7133 - core: use distinct pivot columns for M:N within one STI hierarchy (#8592) (6b5a605)
- postgres: compare interval literals in generated expressions by value (#8585) (e19482b), closes #8482 #8481
- postgres: keep element type modifiers when introspecting array columns (#8498) (08a55c7), closes #8497
- postgres: map restrict violation errors to
ForeignKeyConstraintViolationException(#8558) (4d9178f) - schema: reject combining
deferModewithwhereon unique indexes (#8514) (1bc4d12), closes #8512 - sql: convert driver exceptions on the QueryBuilder read path (#8584) (fa08c33), closes #8577
- sql: emit valid SQL for
$in/$ninon array columns (#8502) (2ab63ff), closes #8454 - sql: handle
$notnested under collection properties (#8471) (fee6fc5), closes #8468 - sqlite: fail fast when an entity declares a schema that is not attached (#8583) (1cbfa26)
- sqlite: keep child rows when a migration rebuilds a table (#8510) (0a3aa8a), closes #6300 #6358
- sqlite: read the definition of the first column when introspecting a table (#8518) (b0f843e)
- sql: keep aliased FK columns when they match a joined relation name (#8573) (0175b57), closes #8571
- sql: resolve inherited columns in TPT child formulas to the parent alias (#8506) (e02bb16), closes #8492
- sql: return one primary key per row from em.insertMany (#8582) (0d3333a), closes #8575
Features
- core: embed a query builder passed as a raw fragment param as a sub-query (#8590) (64763fd), closes #8570
Performance Improvements
v7.2.6
7.2.6 (2026-10-31)
Bug Fixes
- cli: report a configured TS config path skipped without TS support (#8537) (c9951e2), closes #8531
- core: escape backslashes in string default values on the MySQL family (#8554) (a69516e), closes #8553 #8553
- core: keep the options of property-level indexes and uniques (#8491) (c343f42), closes #8488
- core: map MSSQL date results to strings so loaded entities are not dirty (d16b6ab), closes #8539
- core: resolve circular type inference in defineEntity for non-inline filters (#8479) (f4e9f54), closes #7441 #8478
- core: skip scalars of uninitialized references in
em.refresh()(#8444) (f231794), closes #8413 #8442 - core: support same-named properties of different kinds in polymorphic embeddables (#8440) (72ff876), closes #8438
- core: unwrap references when checking nested partial fields in populate (#8549) (3237c58), closes #8548
- mssql: keep composite foreign key columns paired when introspecting (#8449) (690e734)
- mssql: write JSON values as Unicode literals (#8542) (0316a53), closes #8541
- mysql: handle string defaults on text and blob columns (#8485) (4df522c)
- mysql: map generated ids of a batch insert that mixes explicit and generated primary keys (#8475) (85652ae)
- pglite: reject a commit of an aborted transaction (#8552) (c7b0de4), closes #8499 #8550
- postgres: match index columns as whole items when introspecting their sort order (#8490) (2bff5a0), closes #8489
- postgresql: reject a commit PostgreSQL answered with ROLLBACK (#8499) (743fafd), closes #8476
- postgresql: release pooled client when its connection drops mid-transaction (#8448) (ada68f8), closes kysely-org/kysely#1990 #8069 #8447
- schema: align introspected string defaults with the doubled-quote form (#8553) (70946fb), closes #8517
- schema: treat index columns without options as default options when diffing (#8450) (d5d9ef8)
- sql: avoid converting custom types twice in collection operator subqueries (#8470) (85154fb), closes #8467
- sql: refuse to commit when rolling back to a savepoint failed (#8462) (1610b60), closes #8458
- sql: reject forbidden sequences in query comments (#8536) (63c21b0)
- sql: select a formula once when a column needs SQL conversion (#8494) (3887c22), closes #8492 #8493
- sql: select the right column in joined loading when a property is named like another column (#8527) (c3563d7), closes #8526 #8292
- sql: use the persisted JSON keys for indexes on object embeddable properties (#8487) (556bb2f), closes #8486
Performance Improvements
v7.2.5
7.2.5 (2026-10-09)
Bug Fixes
- core: fix custom types and
serializedNameproperties inem.refresh()(#8413) (7463cb2), closes #8410 - core: hydrate STI object embeddables declared with different classes via the root (#8418) (863195c), closes #8417
- core: keep null custom type values in upsert results (#8428) (1a7a9c0), closes #8429 #8427
- core: order flush around relations to TPT subclasses (#8422) (3fd72ce)
- schema: respect
ignoreRoutinesandignoreTriggersin down migrations (#8416) (c28a2ec) - sql: match STI subclasses when joining into an STI entity (#8425) (74a0ba0), closes #8424
- sql: persist conflicting STI properties via the row subtype's property (#8423) (234a84e)
- sql: prioritize formula over convertToJSValueSQL in joined queries (#8415) (404f04c), closes #8414
- sql: select formulas of TPT descendants in polymorphic loads (#8419) (c65163b)