@mikro-orm/postgresql
7.2.11 · 20 Nov 2026MIT1.3M / weekRepositoryHomepagenpmAtom feed
250 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 7.x · latest line
7.2.11
20 Nov 2026core: do not replace entity methods with unknown keys in
assign()core: ignore commas inside default values when reading constructor params
Bug Fixes
core: do not replace entity methods with unknown keys in
assign()core: honor the per-call fail handler in
ScalarReference.loadOrFail()(#8767) (3728594), closes #8758core: ignore commas inside default values when reading constructor params
core: include filter params in the result cache key of queries loading relations
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
mssql: quote schema, table and column names in schema helper queries
mysql: read enum items of tables with a quote in their name
oracle: keep dollar signs followed by digits in values intact
seeder: normalize the seeder name to a valid class identifier in
seeder:createsql: handle unusual identifier names in schema introspection
sql: keep question marks in identifiers and inlined values out of placeholder matching
sql: quote every part of dotted identifiers (#8765) (527a554), closes #8760
Performance Improvements
core: compute populate child fields once per relation instead of per entity
core: reassign collection indexes once when removing many items
7.2.10
16 Nov 2026cli: resolve
MIKRO_ORM_TYPE=mongoto the mongo drivercore: accept numeric strings in
limitandoffsetoptions
Bug Fixes
cli: resolve
MIKRO_ORM_TYPE=mongoto the mongo drivercore: accept numeric strings in
limitandoffsetoptionscore: 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
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 #8690core: match upserted rows by all onConflictFields (#8696) (43943c2), closes #8695 #8294
core: snapshot merged
targetKeyand polymorphic to-one relations correctly (#8715) (faf7597), closes #8661mssql: 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
Performance Improvements
core: avoid per-entity sets and repeated property lookups in
toObject()core: cut per-entity allocations when computing change sets
core: mark collections and references on the prototype
core: reset wrapper fields instead of deleting them
core: skip
ensurePropagation()for entities without bidirectional to-one relations (#8702) (137a009), closes #8671core: skip the merge cascade for entities freshly mapped via
em.map()core: speed up flushing removed entities (#8709) (e9012dc), closes #8698
core: trim per-row overhead when reading entities
core: walk only props with
onUpdatehooks when computing update change setssql: precompute joined column aliases and stop deleting them per row
7.2.9
12 Nov 2026cli: resolve TS loaders from the project root
core: clean up the serialization context when
toObject()orserialize()throws
Bug Fixes
cli: resolve TS loaders from the project root
core: accept
FindOptions<T>typed options in genericfind()wrappers (#8662) (932227e), closes #8655core: clean up the serialization context when
toObject()orserialize()throwscore: 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()
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 #8625core: 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 #7593mongo: return the stored version from
em.upsert()andem.upsertMany()(#8623) (3af6998), closes #8620mssql: raise the default request timeout to 60s
mysql: unescape quotes in introspected check constraint expressions (#8639) (9481b56), closes #8485
oracledb: keep fractional seconds on datetime values returned via OUT binds
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
sql: bump the version property when
upsert()updates an existing rowsql: 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
orderBysql: run joined
qb.update()andqb.delete()as write queries inexecute()sql: skip generated columns in
em.clone()andqb.insertFrom()
Performance Improvements
core: avoid deopt loop when cloning query builder state
core: keep scalar properties as plain data properties (#8671) (e312571), closes #6982
core: skip re-snapshotting entities freshly mapped via em.map()
core: use Object.keys in getObjectQueryKeys
postgres: escape string literals in linear time (#8659) (2929460), closes #8001
7.2.8
6 Nov 2026core: handle non-JSON query values in result cache and dataloader keys
core: include regexp and raw fragment params in result cache keys
Bug Fixes
core: apply the entity default
orderByinem.stream()andem.findOne()(#8612) (840bc49), closes #7133 #8503core: handle non-JSON query values in result cache and dataloader keys
core: include regexp and raw fragment params in result cache keys
core: respect FK
deleteRulewhen removing an entity with loaded 1:M collections (#8608) (9dff7c8), closes #8606migrations: keep table partitioning in the schema snapshot (#8601) (03f85d8), closes #7816
mongo: convert
$reinside$elemMatchand keep$rekeys in entity data (#8611) (47ca87b), closes #8599mongo: convert
$reon renamed fields, next to other operators and under$notmongo: limit inverse M:N populate per parent instead of per owner array
mssql: handle composite PK
$in/$ninwith an empty list or multiple tuplesmysql: 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 #8600sql: order by a composite relation key in paginated queries and with an alias prefix
sql: quote index names in
usinghints and validateusingonem.count()
Performance Improvements
7.2.7
4 Nov 2026core: don't treat record types as
LazyRef
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
LazyRefcore: keep class instances by reference when merging the config (#8496) (d11862d), closes #8495
core: respect the entity default
orderByinem.findByCursor()(#8503) (8d789d8), closes #7133core: use distinct pivot columns for M:N within one STI hierarchy
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
ForeignKeyConstraintViolationExceptionschema: reject combining
deferModewithwhereon unique indexes (#8514) (1bc4d12), closes #8512sql: convert driver exceptions on the QueryBuilder read path (#8584) (fa08c33), closes #8577
sql: emit valid SQL for
$in/$ninon array columns (#8502) (2ab63ff), closes #8454sql: handle
$notnested under collection properties (#8471) (fee6fc5), closes #8468sqlite: fail fast when an entity declares a schema that is not attached
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
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
7.2.6
31 Oct 2026Bug 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 #8442core: 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
mssql: write JSON values as Unicode literals (#8542) (0316a53), closes #8541
mysql: handle string defaults on text and blob columns
mysql: map generated ids of a batch insert that mixes explicit and generated primary keys
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
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
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
7.2.5
9 Oct 2026Bug Fixes
core: fix custom types and
serializedNameproperties inem.refresh()(#8413) (7463cb2), closes #8410core: 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
schema: respect
ignoreRoutinesandignoreTriggersin down migrationssql: match STI subclasses when joining into an STI entity (#8425) (74a0ba0), closes #8424
sql: persist conflicting STI properties via the row subtype's property
sql: prioritize formula over convertToJSValueSQL in joined queries (#8415) (404f04c), closes #8414
sql: select formulas of TPT descendants in polymorphic loads
7.2.4
6 Oct 2026core: match reloaded rows in
upsertManywhen inputs use different unique keys
Bug Fixes
core: check the version in batch updates (#8381) (5156bc4), closes #8380
core: don't infer
defineEntityproperties from indexwhereand key options (#8395) (dca7734), closes #8394core: match reloaded rows in
upsertManywhen inputs use different unique keyscore: support glob characters in the project path (#8390) (f2c02f0), closes #1073
core: upsert rows with a null unique key without touching unrelated rows (#8397) (bb4aa99), closes #8393
mongo: insert on upsert without a unique value
sqlite: respect
createForeignKeyConstraints: falsein schema create and update (#8383) (656fac7), closes #8382
Performance Improvements
7.2.3
30 Sep 2026core: detect changes to decimal strings beyond double precision (#8368) (6ba4d2b), closes high-precision
mssql: skip TPT child tables when reseeding identities in
clear()oracle: introspect primary keys so the schema diff can restore and change them
Bug Fixes
core: detect changes to decimal strings beyond double precision (#8368) (6ba4d2b), closes high-precision
mssql: skip TPT child tables when reseeding identities in
clear()oracle: introspect primary keys so the schema diff can restore and change them
oracle: return non-PK autoincrement and generated columns after inserts
postgres: don't restore stale inbound FKs when repartitioning a table (#8371) (5c15854), closes #8369
postgres: drop unique index expressions via
drop indexinstead ofdrop constraint(#8365) (d798236), closes #8363postgres: leave list/range partitions not declared in metadata unmanaged (#8370) (54d855b), closes #8362
postgres: normalize double precision casts and
betweenin check constraint diffs (#8366) (38cb8fc), closes #8361postgres: respect identity options when diffing and rendering columns (#8351) (77ad8e3), closes #8350
sql: declare the primary key once when replacing it with a new autoincrement column
sqlite: rebuild the table when the primary key is added or changed
sql: only convert regexps that LIKE can express
sql: only skip auto-generated enum checks when diffing check constraints (#8375) (ceeb1bc), closes #8374
sql: restore a missing primary key in the schema diff
7.2.2
28 Sep 2026core: allow falsy values in concurrency checks
Bug Fixes
core: allow falsy values in concurrency checks
core: compare FK column for primary key conditions on polymorphic relations (#8328) (7ead234), closes #8326
core: do not mutate the where condition and data passed to the EntityManager (#8291) (6b42e5b), closes #8290
core: handle primary key values and objects in polymorphic and relation conditions (#8329) (cc54e42), closes #8328
core: hydrate partial upsert results without mismatching entities
core: keep entity identity for relations using
targetKey(#8323) (10c73e3), closes #8322core: keep the input order in
em.upsertMany()when a split batch has duplicate rowscore: make compiled function keys independent of module evaluation order (#8339) (4e52beb), closes #8335
core: map upsertMany results to the corresponding SQL inputs
core: merge columns supplied only by some rows in
em.upsertMany()core: preserve concurrency values in batch lock checks
core: preserve entity schema when restoring cached results
core: preserve existing groups when lifting relation filters
core: resolve repositories in non-transactional callbacks
core: respect custom
fieldNamesin polymorphic relationscore: respect locally disabled transactions during flush
mongodb: throw on unsupported polymorphic relation conditions
mssql: handle OUTPUT results on tables with triggers
mssql: preserve columns from heterogeneous upsert inputs
mssql: restrict TPT identity inserts to the owning table
sql: apply target filters when populating polymorphic relations
sql: do not convert custom types twice in
em.countBy()(#8342) (f2f19f9), closes #8341sql: do not treat persisted properties as virtual in paginated orderBy (#8309) (6e765dd), closes #8308
sql: handle STI subtypes with conflicting property columns and types
sql: keep halfvec and sparsevec dimensions during postgres introspection (#8315) (59d3633), closes #5739
sql: keep rows when ordering by polymorphic relation targets
sql: resolve embedded formulas in partial field selections
sql: resolve inline embeddable columns that shadow the property name (#8293) (7042e34), closes #8292
sql: respect
distinct()anddistinctOn()inqb.getCount()(#8312) (00da4bd), closes #8311sql: respect property returning hints on updates and upserts
Performance Improvements
7.2.1
19 Sep 2026Bug Fixes
core: escape the remaining property names in generated code (#8289) (e15eb04), closes #8221
core: keep populated relations clean after a result cache hit (#8269) (86fd18f), closes #8268
mssql: map legacy
ntextandimagecolumn types (#8288) (e46eddf), closes #8287sql: do not emit returning clause inside the update sub-query (#8283) (60b556a), closes #8282
sql: preserve filtered many-to-many references
sql: respect property returning hints on inserts
sql: select inline embeddable columns once when populating via joins (#8272) (0ec88a2), closes #8271
Features
sql: support read-replica routing in em.execute
7.2.0
7 Sep 2026cli: surface the real error when a TypeScript loader fails to load
core: decompose nested cursor groups lexicographically
core: follow the platform's own null ordering in cursor pagination
mikro-orm.io/blog/mikro-orm-7-2-released
Bug Fixes
cli: surface the real error when a TypeScript loader fails to load
core: decompose nested cursor groups lexicographically
core: follow the platform's own null ordering in cursor pagination
core: handle
orderBydirections carrying a nulls qualifiercore: preserve nested populate filters across loading strategies
core: treat
@Formulaproperties as nullable in cursor paginationdecorators: skip
@oxc-node/corehelper frames when resolving entity pathpostgres: forward
pool.minto thepgpool (#8237) (188b064), closes #8234
Features
cli: add a "-q" param, to suppress informational output
cli: add Nub TypeScript loader option
cli: the "--combined" argument of cache:generate can optionally be a path to the cache file
core: add
getNativeClient()to access the underlying database client (#8148) (27634ad), closes #8146core: add
throughoption for read-only to-one relations resolved via subquery (#8239) (5e621e0), closes #8238core: add native support for row level security (#7984) (8336552), closes #6137 #6413 #6493 #6493
core: allow map to bypass identity map
core: allow specifying a callback for the RequestContext options
core: rework cursor pagination for custom types and nullable columns (#8103) (35a1455), closes #8097
core: support
await usingviaSymbol.asyncDispose(#8159) (e1cbd5d), closes #8158core: support
indexoption on M:N properties for pivot table join columns (#8160) (aa177ed), closes #8156core: support configurable string normalization (#8169) (96fdbb4), closes #8165
core: support named parameters in
em.execute()(#8173) (17788fc), closes #8093migrations: allow opting out of snapshot updates on migrate
mongo: add
$allquery operator supportsql-js: add sql.js driver for in-memory SQLite in WebAssembly
sql: support the
$alloperator on collection properties (#8248) (c987f8a), closes #7931
Performance Improvements
7.1.15
3 Sep 2026core: escape entity property names in generated hydration/comparison code
Bug Fixes
core: apply TPT concurrency check only to the table that declares it (#8228) (9d47084), closes #8227 #8226 #8226
core: apply TPT version property only to the table that declares it (#8227) (8ee0365), closes #8226
core: escape entity property names in generated hydration/comparison code
core: infer
serializercallback value from relation kind indefineEntity(#8215) (9631464), closes #8214core: resolve user-class lookups by class reference instead of class name (#8209) (2431265), closes #8208
core: support polymorphic relations inside embeddables (#8219) (69ed8f8), closes #8218 #8217
sql: join TPT parent tables for relations targeting a sub-class (#8233) (a7e1521), closes #8231
sql: keep relation filters within their own join branch (#8212) (d5feeff), closes #8210
sql: prevent endless loop when entity filters form a relation cycle (#8213) (f30ead9), closes #8211
sql: support upsert for TPT entities (#8229) (eafda32), closes #8226 #8226
7.1.14
26 Aug 2026Bug Fixes
core: don't double-wrap
orderByin M:N dataloader batch load (#8194) (20aa5a8), closes #8193core: don't require the discriminator value when creating an STI entity (#8201) (2b0ca9b), closes #7677 #8200
core: evict referrers holding a removed entity in their primary key (#8205) (16d80a9), closes #8203
core: infer primary key from plain class base in
defineEntitycore: respect explicit join alias in JSON property conditions (#8195) (16a147c), closes #8192
postgres: strip array-typed casts cleanly when recovering check constraints (#8198) (2b3d9c3), closes #8197
sql: keep row-value tuples in
$inon araw()keysql: skip trigger diff when only one side uses
expression(#8191) (e486d39), closes #8190
7.1.13
20 Aug 2026Reading the note…
7.1.12
17 Aug 2026Reading the note…
7.1.11
6 Aug 2026Reading the note…
7.1.10
4 Aug 2026Reading the note…
7.1.9
30 Jul 2026Reading the note…
7.1.8
28 Jul 2026Reading the note…
7.1.7
17 Jul 2026Reading the note…
7.1.6
13 Jul 2026Reading the note…
7.1.5
26 Jun 2026Reading the note…
7.1.4
6 Jun 2026Reading the note…
7.1.3
31 May 2026Reading the note…
7.1.2
29 May 2026Reading the note…
7.1.1
22 May 2026Reading the note…
7.1.0
20 May 2026Reading the note…
7.0.17
17 May 2026Reading the note…
7.0.16
14 May 2026Reading the note…
7.0.15
9 May 2026Reading the note…
7.0.14
4 May 2026Reading the note…
7.0.13
27 Apr 2026Reading the note…
7.0.12
23 Apr 2026Reading the note…
7.0.11
16 Apr 2026Reading the note…
7.0.10
10 Apr 2026Reading the note…
7.0.9
6 Apr 2026Reading the note…
7.0.8
1 Apr 2026Reading the note…
7.0.7
31 Mar 2026Reading the note…
7.0.6
26 Mar 2026Reading the note…
7.0.5
23 Mar 2026Reading the note…
7.0.4
20 Mar 2026Reading the note…
7.0.3
18 Mar 2026Reading the note…
7.0.2
14 Mar 2026Reading the note…
7.0.1
11 Mar 2026Reading the note…
7.0.0
11 Mar 2026Reading the note…
- 6.x
6.6.19
20 Nov 20266.6.18
12 Nov 2026Bug 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 #8194core: 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)
6.6.17
2 Oct 2026Bug Fixes
core: accept plain arrays for enum array properties in EntityData (#8168) (b90c287), closes #8166
core: keep populated relations clean after a result cache hit (#8270) (d338572), closes #8268 #8269
migrations: keep the snapshot when the migrated database still matches it (30f6491), closes #7804
postgresql: stop spurious schema diff on PostGIS type modifiers (1a82866), closes #7803
query-builder: do not inline raw query parameters
sqlite: fix enum introspection for enums with more than two values
6.6.16
17 Jul 2026Reading the note…
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.