Changelog
All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
6.3.13 (2024-10-06)
Bug Fixes
- core: add child
SerializeOptions
to customserializer
parameters (dbfddce), closes #5968 - core: fix partial loading on to-many relations (224613f), closes #6097
- core: fix same-second dates diffing (#6094) (cd7ce82)
- core: fix validation for not discovered entity trigger from
Collection
access (4834920) - core: ignore non-persisted properties on embeddables (#6107) (e688694), closes #6105
- core: respect joined filters on
em.count()
(#6115) (4f0bde5) - core: revert making the
$and/$or
arraysreadonly
(0e0667c), closes #6085 - postgres: improve schema diffing for native enums with explicit schema (#6114) (fa537b1), closes #6101
Features
- core: improve error message when only abstract entities are discovered (3835e40)
Performance Improvements
- core: simplify lookup of returned values from batch updates (6caa82a)
6.3.12 (2024-10-01)
Bug Fixes
- core: accept
readonly
arrays in operator where conditions (#6085) (1ab24fe) - mongo: ensure
Date
properties are correctly cloned and persisted (8d81985), closes #6078 - mongo: fix persisting objects like
ObjectID
in JSON properties (#6091) (c28f06f), closes /github.com/mikro-orm/mikro-orm/blob/f48e5443f3fe3539d24a53dcb6a82f280e3999ee/tests/Utils.test.ts#L159 /github.com/mikro-orm/mikro-orm/blob/f48e5443f3fe3539d24a53dcb6a82f280e3999ee/tests/features/custom-types/GH6050.test.ts#L56 - mongo: fix populating lazy M:N owning sides (f7e90cb), closes #6079
Features
- core: prevent conversion of
many
entities inoneToMany
fromextractConstructorParams
(#6093) (8ba8d7a), closes #6092
6.3.11 (2024-09-26)
Bug Fixes
- core: fix diffing of object properties (55df57f), closes #6050
- core: fix partial loading with
*
on joined strategy (1f0dbd4), closes #6045 - core: properly detect when Windows imports need patching (#6035) (a6c4dea)
- core: skip extra query when loading inverse side of 1:1 relation with a filter (ccf099f)
- core: support atomic updates on properties with custom types (951284b), closes #6030
- migrations: use ORM logger and respect
loggerFactory
(e845c26), closes #6039
Features
Performance Improvements
- core: reduce nesting of
toPOJO()
serializer (4b263f3)
6.3.10 (2024-09-15)
Bug Fixes
- core: allow accessing PK props on
Ref
properties with partial loading (32d588d) - core: fix dynamic imports on Windows (#6020) (e697ec2)
- core: fix mapping of version properties from batch updates (ec521c9), closes #6016 #6022
- core: respect context name in
@EnsureRequestContext()
(4574831) - core: support dynamic discovery via
EntitySchema
(3fde7d4), closes #6026 - mongo: support partial loading of M:N owning sides (#6027) (e53a7d9)
6.3.9 (2024-09-09)
Bug Fixes
- core: fix expansion of array conditions to
$in
operator for raw values (59c627e) - core: fix hydration of datetime when provided a ISO string value via
em.create()
(2992046) - core: implement joined filters via
populateFilter
option, separately frompopulateWhere
(#6003) (9d0a022), closes #5893 - postgres: fix casting of JSON values when used with
$in
operator (840d3cd), closes #6000
6.3.8 (2024-09-04)
Bug Fixes
- core: check proptotype chain while cloning (#5979) (d5eeee5), closes /github.com/reforms/ts-jenum/blob/e1a45f54537ec5bd6abc258391e656e8c6339595/src/ts/jenum.ts#L181-L184 /github.com/mikro-orm/mikro-orm/blob/c0dacd8964786118d094fb6f88c3c136bcfa7115/packages/core/src/utils/clone.ts#L123
- core: fix populating lazy scalar properties inside embeddables (ffcd0e0), closes #5956
- core: improve support for embeddables in
em.upsert()
(78dbeed), closes #5969 - core: infer runtime type based on
new Date()
property initializer (ed0560b) - postgres: fix parsing of
timestamptz
values with negative timezone (8ccc925) - schema: change default of
disableForeignKeys
to false (#5993) (8a8aa2d)
6.3.7 (2024-08-28)
Bug Fixes
- core: don't double encode JSON properties inside object/array embeddables (f3321f9), closes #5963
- core: fix hydration of collections with
forceEntityConstructor
enabled (d4d8506), closes #5972 - core: provide entity instance in object constructor params for m:1/1:1 properties (fe2d129)
- core: respect context in EM transaction methods (8912185)
- core: respect entity level
forceConstructor
option (c642a49)
6.3.6 (2024-08-14)
Bug Fixes
- core: fix hydration of polymorphic embeddables with overlapping property names (ab5c595), closes #5935
6.3.5 (2024-08-11)
Bug Fixes
- core: track changes on non-scalar properties (a02c727), closes #5750
- entity-generator: ensure
columnType
is emitted correctly and when necessary (#5930) (72333ad), closes #5928 - entity-generator: unknown type defaults always use default/defaultRaw, never runtime (#5927) (dcc8227)
- postgres: allow string value for
$overlap/$contains/$contained
operators (6c1b12a) - postgres: do not produce extra updates for fulltext properties (d18e5ed), closes #5908
- postgres: respect
timezone
option and interprettimestamp
columns in UTC by default (#5916) (1da0722), closes #5591
Features
- cli: detect
bun
when checking for TS support (e87ebc9) - core: add
RequestContext.enter()
which usesALS.enterWith()
(dc06f60)
6.3.4 (2024-08-06)
Bug Fixes
- core: adjust collection owner's serialization context when lazy-loading (#5903) (57f234b), closes #5559
- core: do not convert bigints with mapping to
number
tostring
on serialization (ee24f1f), closes #5839 - core: fix populating lazy properties inside inlined embeddables (8d1e925), closes #5848
- core: merge enum items from STI entities with the same name (06fffbd), closes #5807
- mssql: convert tuple comparison queries to simple
and/or
conditions (#5906) (c3c3519) - schema: respect check constraints from base entities (22b7e97)
6.3.3 (2024-08-03)
Bug Fixes
- core: ensure
@CreateRequestContext()
works when invoked from explicit transaction (de0b515) - core: fix unnecessary populate query when partial loading via joined strategy (33da574), closes #5889
- knex: update
PoolConfig
interface to match what knex supports (#5892) (eb5d4a1)
Features
6.3.2 (2024-08-01)
Bug Fixes
6.3.1 (2024-07-25)
Bug Fixes
- core: always check TS config files if TS support is detected (eb100fe), closes #5852
- core: discover base entities first to fix detection of STI when root entity not explicitly listed (7c1976f)
- core: fix CreateRequestContext not working with callback returning EntityManager (#5873) (3de546d), closes 1#L132
- schema: skip db default inference only for polymorphic embeddables (925c69e), closes #5847
Features
6.3.0 (2024-07-18)
Bug Fixes
- cli: enforce
moduleResolution: 'nodenext'
for CLI context (d5d7f38), closes #5514 - core: allow
em.transactional
handler to be synchronous (#5696) (fd56714) - core: allow passing
null
to optional properties inem.create()
(df0db99), closes #5827 - core: ensure correct identity when upserting without primary key (cdbab12), closes #5702
- core: ensure correct mapping of related columns to owning entity fields for complex relations (#5630) (302600e), closes #5629
- core: ensure correct mapping to native bigint in sqlite and mysql (a16b801), closes #5737
- core: fix auto flush mode for
em.count()
(62db127) - core: fix auto flush mode for
em.findAndCount()
(a572869) - core: fix batch update of nullable embedded arrays (c1ea284), closes #5723
- core: fix detection of constructor parameters with default object value (58e8c2a), closes #5710
- core: fix handling of pivot entities with M:N relations (fa89731), closes #5774
- core: fix handling of raw query key of where condition with
[]
on right side (1e76509), closes #5825 - core: fix populating entity graph with cycles (6505510)
- core: fix processing of nullable embedded arrays (01612a1), closes #5715
- core: ignore existing contexts in
@CreateRequestContext()
(1bb4e22), closes #5801 - core: improve handling of JSON properties to support numeric strings in all drivers (#5780) (fc50c5f), closes #5773
- core: make
raw()
accept readonly params (#5832) (7f9daf7) - core: respect
populate
option inReference.load
for loaded relations (04fb826), closes #5711 - core: respect
populateOrderBy
withselect-in
strategy (3b83d29), closes #5693 - core: respect nullability of wrapped types for ScalarReference's (#5722) (a1b8f07)
- core: respect parent property prefix when child has
prefix: false
(94367b8), closes #5642 - core: support for TS 5.5 (2fd7359)
- core: support overloading embedded properties (#5784) (c57b528), closes #2987
- core: use
NonNullable
instead of the internalDefined
type (8ef28c4) - core: use the same transaction context in
em.refresh()
(dd17706), closes #5753 - core: using
EntityData<Entity, true>
now works withIType
(#5810) (f339ef5) - entity-generator: correctly serialize string prefixes in embedded references (#5826) (7882bca)
- entity-generator: fix handling of primary keys that are foreign keys or enums (#5673) (b10413f)
- entity-generator: fixed default values for enums (#5765) (58d914d)
- entity-generator: generate all bidirectional relations in case of conflicts (#5779) (af845f1), closes #5738
- entity-generator: include all entity options in EntitySchema definitions (#5674) (94ef44e)
- entity-generator: output all DB related info even for virtual properties (#5817) (845b75c)
- entity-generator: output entity and prop comments (#5699) (4ef21c4)
- entity-generator: support complex enum names and values (#5670) (7dcb7be)
- entity-generator: when using esmImport, FKs are now wrapped with Rel (#5771) (c28ab16)
- mssql: add proper support for MSSQL's native "varchar" type (#5685) (0b514ce)
- mssql: fix handling of non-UTC timezones (e78696c), closes #5695
- mssql: only escape strings and unicode strings when necessary (#5786) (b4e0914), closes #5811
- mysql: fix support for older MySQL versions than v8.0.13 when reading indexes (#5654) (3c4f665), closes #5653
- postgres: implement diffing support for
vector
type (9eadac1), closes #5739 - postgres: put new native enum values into the correct position (f79e3bc), closes #5791
- postgresql: ignore tables that use inheritance during schema diffing (#5648) (55f452a)
- postgres: respect empty string in enum items (c02f12e), closes #5751
- postgres: support enum arrays with special characters (54b30cb), closes #5781
- query-builder: don't use alias in more complex queries when not needed (#5679) (ad347e7), closes #5676
- query-builder: interpolate raw query params early to ensure the correct binding position (9bd0fe9), closes #5706
- query-builder: process raw query fragments under operator value (98510a3), closes #5724
- query-builder: quote alias in formulas when joining virtual relations (68b64ec), closes #5705
- query-builder: skip inner select for properties that map to a raw query fragment during pagination (1c5154a), closes #5709
- schema: always prefer index/unique expression (96dff53), closes #5668
- schema: do not drop FKs in down migrations when they are disabled (0dcfa80), closes #4993
- schema: skip implicit FK index when defined explicitly by user on entity level (ff6bfdc), closes #5725
- sql: fix ordering by m:1 and 1:1 relations with joined strategy (28119c6)
- sql: ignore generated columns when computing changesets (55dfbf9), closes #5660
- sqlite: fix altering tables via malformed temp table (#5683) (1b9087c), closes #5672
- sql: rework detection of problematic batch updates and split more aggressively (b045033), closes #5656
Features
- cli: always check TS files regardless of
useTsNode
(#5650) (7c34416) - core: addz
Platform.getDefaultVarcharLength
and optionalType.getDefaultLength
(#5749) (29dcdeb) - core: allow passing
raw()
intoonConflictFields
of upsert methods (#5691) (bff90f2), closes #5668 - core: allow upserting without a unique value (#5726) (75a4706)
- core: check for ORM extensions dynamically (#5651) (68a3c1f)
- core: implement "character" type (DB type "char") (#5684) (9fa5fad)
- entity-generator: add a coreImportsPrefix option (#5669) (b9ab69a)
- entity-generator: added option to output pure pivot tables (#5809) (832a626)
- entity-generator: added the ability to add extra names to be imported (#5797) (82696b3)
- entity-generator: allow custom types for scalar relations (#5435) (a8a9126)
- entity-generator: enable the generator to dictate import specs via
extraImport
(#5772) (effd9fb) - entity-generator: repository class reference can be added from hooks (#5785) (44a49a9)
- entity-generator: support adding groups through metadata hooks (#5793) (a756271)
- libsql: support connecting to remote turso database (#5764) (6255a33)
- migrations: allow initial migration to be blank if no entities are defined (#5802) (a8f6864)
- migrations: make
--blank
also generate adown
migration (#5657) (056d336) - postgres: allow specifying deferred mode on unique constraints (#5537) (7672b56)
- postgres: support
on delete set null/default
with subset of columns (5353e6a), closes #5568 - postresql: add support for varchar with unlimited length (#5707) (c22e971)
- query-builder: infer
Loaded
hint based onjoinAndSelect
calls (#5482) (d18da6b)
Performance Improvements
- core: improve serialization speed (136f704)
- core: rework
EntityKey
type to improve tsserver performance (#5762) (dabe734), closes #5708
6.2.9 (2024-05-31)
Bug Fixes
- cli: use
module: 'nodenext'
when registering ts-node (#5514) (8695524), closes #5427 - core: detect path from decorator for each class only once (#5545) (9af0e38)
- core: improve support for
clientUrl
with additional query parameters (1472705), closes #5608 - core: improve support for sharing columns in composite PK and FK (#5623) (7190879), closes #5622
- core: improve validation for missing
dbName
whenclientUrl
is provided (c21359e) - core: respect
ignoreNestedTransactions
from upper context (eab4df6), closes #5585 - core: use explicit
NoInfer
type helper to support TS<5.4 (c38b366), closes #5613 - knex: explicitly declare all the extended drivers as optional peer dependencies (#5647) (64045ad)
- mssql: account for quotes in table names (#5637) (0343609)
- mssql: fix creating migrations due to a missing helper method (#5644) (90e27c2), closes #5633
- mssql: fix creating schema for migrations table (fe1be6f), closes #5644
- mssql: fix ensuring the database exists on older SQL Server versions (f0a5790), closes #5638
- postgres: respect
deferMode
option in 1:1 relations (#5641) (101c0a8) - reflection: detect complex runtime types and don't use them as column types (0c8a587), closes #5601
- reflection: support entities compiled by babel (#5628) (26f627e), closes #5610
- schema: fix diffing renamed indexes and columns when the names are not lowercase (4019dc3), closes #5617
- sql: implement batching of M:N collection update queries (d97979b), closes #5627
Features
- core: allow overriding the
--config
argument name (8b304ab)
Performance Improvements
6.2.8 (2024-05-21)
Bug Fixes
- cli: disable eager connection when creating the ORM instance (ef5d14a), closes #5030
- core: allow hydration of non persistent embedded properties (#5579) (e8c0c3f), closes #5578
- core: always use root entity when computing M:N field names with STI (568e57f), closes #5586
- core: map embedded constructor parameters (24f3ee6)
- postgres: support
lockTableAliases
with explicit schema name in config (3fdb077), closes #5125 #5404 - schema: use
type
ascolumnType
when no matching mapping found (cd7f85c), closes #5587 - sql: respect
timezone
when mapping joined properties toDate
(7f9bb0b), closes #5577
6.2.7 (2024-05-18)
Bug Fixes
- core: fix ordering by joined embedded object properties (cbd7c3e), closes #5560
- mongo: ensure JSON values are properly diffed (577166a), closes #5572
- query-builder: improve handling of nested
$and/$or
queries (567d65a) - schema: revert the
dbName
after dropping the database (725f7e9), closes #5583
6.2.6 (2024-05-14)
Bug Fixes
- core: fix mapping of
Date
properties frombigint
values (05c802b), closes #5540 - core: quote column name for the returning statement when using
convertToJSValueSQL
(4783945), closes #5563 - core: respect
runtimeType
override with reflect-metadata provider (f1c9740) - query-builder: don't remove joins used by other joins during pagination (#5566) (b05c434), closes #5565
- reflection: allow inference of
Ref<boolean> & Opt
(534f088), closes #5557 - sqlite: fix mapping of joined results with
DateTimeType
properties (4001d2b), closes #5550
6.2.5 (2024-05-05)
Bug Fixes
- core: fix extra updates on embedded array properties (48fde11), closes #5530
- core: fix hydration of relations with custom types via joined strategy (07f10c8), closes #5518
- core: improve support for mapping
DecimalType
tonumber
(5a3e30e) - core: limit depth in custom
inspect
methods to get around debugging issues in vscode (f706c06), closes #5525 - core: support path detection from decorators in bun (6683bcc), closes #5496
- mongo: support cursor pagination on
Date
properties (4281320), closes #5496 - mysql: infer unsigned value for FKs based on the target PK (b7ae145), closes #5485
- query-builder: do not reset join conditions when paginating (0b851e5), closes #5538
- schema: skip extra columns in nested pivot entities (f34e4d7), closes #5276
Features
- core: allow specifying the
runtimeType
explicitly (e9c0c07)
6.2.4 (2024-05-02)
Bug Fixes
- core: do not issue extra updates when there are no matching changesets (03934d0), closes #5510
- core: fix extra updates with
forceEntityConstructor
and JSON properties (5ef57b6), closes #5499 - core: keep transaction context when forking for
disableIdentityMap
(ed88a02), closes #5527 - core: keep transaction context when forking for
disableIdentityMap
(8d4fe98), closes #5528 - core: support
onCreate
withScalarReference
properties (09e5ca8), closes #5506
6.2.3 (2024-04-24)
Bug Fixes
- core: fix handling of
first/last: 0
with cursor-based pagination (508389e), closes #5501 - core: ignore upsert with inlined embedded properties (7d2bed6), closes #5500
- migrations: fix reading migration snapshot (096dcee), closes #5497
- query-builder: do not prune join branches when paginating and there are raw fragments in select clause (4d0fe15), closes #5490
6.2.2 (2024-04-20)
Bug Fixes
- core: do not enforce
require()
when running via ts-jest or on JSON imports (7e8409b), closes #5461 - core: fix folder-based discovery for multiple entities in single file (#5464) (d64be7e)
- core: ignore serialization options when using
toPOJO()
(#5481) (46d6eb4), closes #5479 - migrator: store snapshot only after migration is generated (#5470) (65ec57c)
- mssql: declare
import
types explicitly (02494bf), closes #5462 - mysql: fix reading
auto_increment_increment
value (1da88af), closes #5460 - postgres: support wildcard native enums (e183de3), closes #5456
Features
- entity-generator: extend filtering options for EntityGenerator (#5473) (0894ac9), closes #5469
- query-builder: allow returning promise from virtual entity
expression
(ee98412), closes #5475
6.2.1 (2024-04-12)
Bug Fixes
- core: skip 1:1 owner auto-joins for lazy properties (6442e57)
- knex: rework postgres and mysql dialect imports to fix compilation errors (ffdca15)
- mssql: support instance names in
host
(dc7dc4c), closes #5441 - query-builder: do not ignore unmatching partial loading hints in
qb.joinAndSelect
(ccdf018), closes #5445 - query-builder: fix partial loading via
qb.joinAndSelect
with explicit aliasing (da68503), closes #5445 - query-builder: generate join on condition for subquery joins with known property name (3dfbbde), closes #5445
- query-builder: respect collection property where conditions (declarative partial loading) (3b4fc41), closes #5445
6.2.0 (2024-04-09)
Bug Fixes
- core: do not select 1:1 owning FK twice (fa69276)
- core: fix querying by embedded properties inside relations (2e74699), closes #5391
- core: fix support for custom repositories in
@CreateRequestContext
on type level (aacac83) - core: fix TypeError when ordering by embedded populating properties (2c472ab), closes #5389
- core: ignore current context when creating repository instance (4c12fc5), closes #5395
- core: prefer entity type inference from the first parameter of entity manager methods (523963b)
- core: respect custom
EntityManager
type inem.fork()
(bb1a3f9), closes #5415 - core: support passing
Configuration
instance toMikroORM.init
(54a37d0), closes #5413 - entity-generator: allow arbitrary class and prop names as identifiers (#5359) (b0c0236)
- mariadb: rework pagination mechanism to fix extra results (a57cb19)
- mysql: support
order by nulls first/last
for raw query fragments in order by keys (a2a8f0d) - postgres: drop text enum check constraints only when necessary (#5414) (5162345), closes #4112
- postgres: removed erroneous duplicates in FK discovery query (#5376) (eec2b38)
- query-builder: fix serialization hint of nested
qb.joinAndSelect()
calls (c2843b9) - schema: improve detection of renamed columns (4d13c58)
- schema: rework dropping columns to support custom schemas and merge drop column queries (255f425)
Features
- core: add support for serialization groups (#5416) (818c290)
- core: allow better type-safety for custom types via
IType
(#5383) (0e18346) - core: allow configuring
driverOptions
on replica level (05e81f8) - core: include all dirty collections to
UoW.getCollectionUpdates()
(e7bd66f) - core: make
assign
options configurable globally (bc9f6f5), closes #5410 - libsql: add libSQL driver (#5417) (6c63e4b), closes #5283
- mssql: add MS SQL Server driver (#1375) (eeaad45), closes #771
- postgres: allow defining deferred FK constraints (#5384) (f42d171), closes #5306
- query-builder: add
limit 1
when executing query viagetSingleResult()
orexecute('get')
(c2b22e8), closes #5379 - query-builder: add
qb.getLoggerContext()
andqb.setLoggerContext()
(779fa15), closes #5358 - schema: allow configuring
updateRule
anddeleteRule
for pivot tables (cc69c3c) - schema: improve
orm.schema.execute()
to support executing batches (3c5a347) - schema: support recreating the whole database via
orm.schema.refreshDatabase()
(2e4ab49)
Performance Improvements
- core: optimize metadata discovery (c322f9b)
- query-builder: remove unnecessary join branches when pagination is applied (d228976)
6.1.12 (2024-03-24)
Bug Fixes
- core: fix assignability of partially loaded entities (9de4965), closes #5374
- core: fix inlining of
$and
conditions (8ddb3e4), closes #5368 - entity-generator: try to resolve errors for foreign keys without indexes (f2094ab), closes #5364
- postgres: fix query for loading all foreign keys from existing schema (2eb85d5), closes #5364
- reflection: fallback to not proving path to tsconfig if not found (a24d80d)
Features
- cli: add reason for failed connection check in
debug
command (d61e248) - core: allow passing
EntityManager
orEntityRepository
to@CreateRequestContext
decorator (184cdd4) - postgres: add
?
,?|
and?&
json operators (#5366) (6418872), closes #4678
Performance Improvements
6.1.11 (2024-03-18)
Bug Fixes
- core: improve serialization of lazily partially loaded entities (1c7b446), closes #5139
- core: support unsetting composite FKs via flush (64f2afd)
- migrator: type mismatch between Migration interface and class (#5343) (2fba5ee), closes #5340
- query-builder: fix aliasing of FK when used in deeply nested and/or conditions (ebb966c), closes #5086
- reflection: respect custom tsconfig options (e8cfdc0)
- sql: fix aliasing of nested composite FK queries (60b2c91)
6.1.10 (2024-03-14)
Bug Fixes
- core: detect
ts-node
when using esm loader (#5332) (23cc880) - core: don't alias formulas in update/delete queries (9e35642), closes #5334
- core: fix populating references for 1:m collections (9b9027d), closes #5336
- core: fix value of
hasPrev[/Next]Page
when paginating backwards (#5320) (00239eb) - postgres: fix diffing of native enums (create/remove via
schema:update
) (7c8be79), closes #5322 - query-builder: allow joining object/array properties (fd90bae), closes #5325
- query-builder: fix
join on
conditions whereor
operator (92936ef) - schema: support compound index over JSON property and a regular column (319df49), closes #5333
- sql: allow creating query builder from a global context (9217bb3)
- sql: override FK value when it's disallowed by query condition (0d20847)
Features
- core: add
onlyOwnProperties
option toassign
helper (#5330) (a081bea), closes #5327 - postgres: provide more details in driver exceptions (e782d06)
Performance Improvements
- core: disable change tracking on scalars when
flushMode: auto
(fc30bfe)
6.1.9 (2024-03-10)
Bug Fixes
- core: don't propagate changes from
em.transactional()
to upper context if its global (7ac9a19), closes #5309 - core: ignore filters on relations inside embedded properties (1e4b2ce), closes #5310
- core: improve checks for generated columns (0396e1e)
- core: map virtual relations with
persist: false
as formulas to preserve aliasing (20a4cfb) - entity-generator: emit missing imports in
EntitySchema
generated files (#5311) (f680d66) - entity-generator: output type import statements for type only core imports (#5317) (bd3f160)
- migrator: allow
up
anddown
methods to be synchronous (#5316) (dd6daf9)
Features
6.1.8 (2024-03-06)
Bug Fixes
- core: allow setting values to
null
on unloaded references (1cbead6), closes #5274 - core: fix bulk-inserting entities with nullable embedded arrays (f16551e)
- core: skip STI discriminator condition when bulk-deleting entities (fa712ca), closes #5303
- query-builder: fix
qb.getResultAndCount()
when pagination is triggered (67444c0)
6.1.7 (2024-03-04)
Bug Fixes
- core: add
em.addFilter()
fallback signature that allows more than 3 types (b6efd44) - core: fix aliasing of queries with collection operators (0435faf), closes #5301
- core: ignore collection operators in
populateWhere
conditions (7b6b363) - query-builder: check for duplicate selects when wrapping pagination query (e005cc2)
- query-builder: fix cloning of alias map (50d8fb9)
Features
- core: validate wrong placement of collection operators (c35e705)
6.1.6 (2024-02-28)
Bug Fixes
- core: don't refresh collection state via
Collection.load()
(f5be639), closes #5268 - core: fix type of
options
parameter inrepository.upsert/Many()
(4c12e7f) - core: support raw fragments in
orderBy
of 1:m and m:n relations (ed80163), closes #5277 - mysql: apply current context when fetching
auto_increment_increment
(#5280) (c8021da), closes #5279
Performance Improvements
- core: improve composite PK hashing (73094ef)
- core: improve hydration of simple FKs (c4bd1f0)
- core: optimize adding entities to large collections (8a960d5)
6.1.5 (2024-02-21)
Bug Fixes
- core: allow serializing raw SQL fragments outside of entity serialization (9158f51), closes #5257
- core: ensure missing type validation ignores enums (a916710), closes #5255
- core: fix
orderBy
option on to-many properties with arrays (fae2302), closes #5265 - core: ignore virtual properties in partial loading hint (d327db5), closes #5261
- entity-generator: fixed generation of unsigned columns (#5254) (d78da29)
- entity-generator: optional and hidden properties get type option + string defaults (#5264) (12d3b54), closes #5260
- schema: allow 1:m properties in pivot entities (c370578)
6.1.4 (2024-02-16)
Bug Fixes
- core: fix populating 1:1 inverse sides when virtual FK is not selected (46cb6a1), closes #5245
- entity-generator: use
Ref
wrapper on all lazy properties (#5252) (50311cb) - query-builder: fix caching of raw query fragments when
qb.getQuery()
is called (f79a752), closes #5247
Features
6.1.3 (2024-02-13)
Bug Fixes
- core: fix extra updates when embedded property name matches inner field name (e008dab), closes #5240
- core: fix validation for removing items from 1:m collections (34b8473), closes #5243
- postgres: implement casting for JSON queries on types like
double
orbigint
(b00eae6), closes #5239
Features
6.1.2 (2024-02-11)
Bug Fixes
- core: allow multiple abstract levels for STI entities (0c56118), closes #3745
- core: respect user provided env vars over those from
.env
file (e25ca11)
Features
6.1.1 (2024-02-10)
Bug Fixes
- core: consider star populates on nested positions only for one level (65d1575), closes #5213
- core: do not enforce
discriminatorColumn
type (d2a016e), closes #5224 - core: fix change detection on STI entities (3c43251), closes #5224
- core: fix optimistic locking on STI entities (36ad806), closes #5224
- core: respect star in
parent.*
populate hints (39910ab), closes #5213 - postgres: declare dependency on
postgres-array
(e73fd1a) - postgres: fix parsing of date properties inside object emebddables (760ec77), closes #5216
- reflection: only validate known types to allow using type aliases (d6b93be), closes #5221
Features
6.1.0 (2024-02-04)
Bug Fixes
- core: allow
CacheAdapter.get
to returnPromise<undefined>
(#5200) (98ce1e5), closes #5199 - core: fix broken inference of
AutoPath
in TS 5.4 (#5197) (8bbc252) - core: handle possible match between virtual property name and another property's field name (7fc779f), closes #5191
- core: make
wrap(e, true).__em
correctly typed toEntityManager
(35d607c) - core: process upsert data to allow using entity instances in place of relations (9305653), closes #5165
- core: respect
upsertMany
options when batching (d6d1381), closes #5209 - core: respect hidden properties of composite PKs during serialization (3d1cba3), closes #5203
- postgres: improve diffing of native postgres enums (49d6b4d), closes #5108
- query-builder: support
convertToJSValueSQL
on returning statement of update queries (2e1d6c8), closes #5176
Features
- core: add second EM parameter to
onCreate
andonUpdate
callback (a964aeb), closes #5201 - core: allow declarative partial loading of collection items (#5210) (5e4fa60), closes #4963
- core: allow mapping array columns to arrays of objects via
ArrayType
(#5204) (42cc9cc), closes #5188 - entity-generator: allow post processing the metadata (#5113) (e82058f), closes #5010
- knex: add
loggerContext
parameter toem.execute
(b6d46df)
6.0.7 (2024-01-30)
Bug Fixes
- core: consider
PrimaryKeyProp
as optional properties forem.create()
(69522f2), closes #5187 - core: do not add
undefined
tonull
types inEntityDTO
(d661c68), closes #5186 - core: fix ignoring function properties when they are optional (fb33934)
- reflection: fix validation of string enums when loading via
QueryBuilder
(908864c), closes #5185
Features
6.0.6 (2024-01-29)
Bug Fixes
- core: ensure
em.insertMany
returns array of PKs for a single item too (#5180) (0d58aaf), closes #5179 - core: fix TypeError caused by validation of duplicate field names (01d8c26), closes #5163
- core: make PK properties non-nullable in
EntityDTO
(dc4fc6f) - core: respect optionality in
EntityDTO
type (1691a79) - core: validate missing populate hint for cursor based pagination on relation properties (ea48db0), closes #5155
- mongo: ensure
assign
on object properties won't ignore changes (a360300), closes #5158 - query-builder: only map the first result with
qb.getSingleResult()
(0e56fe1), closes #5182
6.0.5 (2024-01-18)
Bug Fixes
- cli: try to respect windows ESM binary (57e91e2), closes #5147
- core: do not infer
populate: ['*']
fromfields: ['*']
(f658376), closes #5139 - core: do not mutate data provided to
em.upsert/Many
(3d8c242), closes #5136 - core: don't convert mapped types for constructor parameters when creating new entity (37befd3), closes #5150
- core: fix bigint mode detection when hydrating new entity from returning statement (a42321d), closes #5146
- core: merge serialization hints when lazy populating (f1d2487), closes #5138
- query-builder: cache knex QB instance to get around issues with raw fragments (f6e76d8)
- reflection: improve detection of
Ref
types with FK as PK (c8858d2), closes #5144
6.0.4 (2024-01-15)
Bug Fixes
- core: respect reloaded properties of partially loaded entity during serialization (f7b6497), closes #5128
Features
6.0.3 (2024-01-13)
Bug Fixes
- core: allow raw fragments as keys with multiple conditions (d0d5de8), closes #5112
- core: fix leaking raw fragments cache (9638410)
- core: respect raw fragments in
orderBy
andpopulateOrderBy
(7bf986c), closes #5110 - core: support raw fragments in order by with pagination (67ee6f5), closes #5110
Features
- core: do not map array types as
Loaded
when partially loaded (75d035d), closes #5123 - core: export
AutoPath
andUnboxArray
types (000c50c), closes #5124 - core: map double and decimal properties to
number
orstring
based on the runtime type (312f293), closes #5120 - core: provide mapped custom types into constructor with
forceEntityConstructor
(b293789), closes #5118
6.0.2 (2024-01-09)
Bug Fixes
- core: allow calling
em.remove
with not managed entity (88e055e), closes #5103 - core: respect
logging
options inem.count
(3b94bf9), closes #5085 - core: respect
logging
options inem.count
(481d02e), closes #5085 - core: support
$some/$none/$every
on nested relations (2b3bd4d), closes #5099 - reflection: fix processing of
Opt
andHidden
types when used in intersection (2bd612e)
Features
- core: add
wrap(entity).isManaged()
(5931649), closes #5082 - entity-generator: allow customizing entity name based on schema name (1e5afb8), closes #5084
6.0.1 (2024-01-08)
Note: Version bump only for package @mikro-orm/root
6.0.0 (2024-01-08)
Bug Fixes
- core: allow using classes with private constructor with
EntitySchema
(d4d5b5e) - core: collection.loadItems() should respect wildcard populate (7f3065f), closes #4977
- core: do not load all env vars from
.env
files automatically (09e60f7) - core: ensure correct serialization of not fully populated collections (a39a850)
- core: ensure propagation and change-tracking works with
useDefineForClassFields
(#4730) (83f24aa), closes #4216 - core: fix automatic calling of
ensureDatabase
oninit
(827b1f1) - core: fix hydration of complex FKs with joined strategy (a4f30ac)
- core: fix hydration of object embeddables via joined strategy (b3e3e55), closes #5020
- core: ignore SQL converter on object embeddables with custom types (83b989e), closes #5074
- core: improve
EntitySchema
typing forrepository
option (37ee42e), closes #5006 - core: make
em.create
strictly typed for relations too (#4752) (3535cc0), closes #4748 - core: make
Loaded
type more flexible (c95e3b6), closes #3277 - core: mark
Reference.set()
as private (#5017) (5aebf0b), closes #5003 - core: refactor mapping of
Date
properties (#4391) (3a80369), closes #4362 #4360 #1476 - core: respect
@Index
and@Unique
decorators on embeddables (#4736) (c3d7717) - core: respect global
schema
option in first level cache (1833455) - core: respect schema option for entity instances in
em.insert/Many
(7eae031), closes #4424 - core: return managed entity from
em.refresh()
(0bf5363) - core: return managed entity from
em.refresh()
(55815f4) - core: rework
Collection
initialization to useem.populate()
(#4571) (7495142), closes #4464 - core: rework pivot table joining (#4438) (0506d36), closes #4423
- core: support embedded properties with conflicting property names (b43ef63), closes #5065
- core: use
join on
conditions forpopulateWhere
(#4025) (a03e57c), closes #3871 - entity-generator: use index expressions for complex indexes (e.g. conditional) (64a39f8), closes #4911
- knex: respect connection type in
em.getKnex()
(46957ba) - mongo: don't rename
id
to_id
for embeddables and entities without serialized PK (0cee82d), closes #4960 - postgres: allow postgres array operators on embedded array properties (ecf1f0c), closes #4930
- postgres: parse timestamp dates less than year 100 (e774d40), closes #5071
- respect postgresql no timestamptz precision default (#3832) (9fd7e26)
- sql: do not alias conditions for update queries with collection operators (5820d66), closes #4956
- sql: do not branch to-many joins for
$and
with a single item (a737b20) - test: fixed seed-manager.test.js on windows (#4924) (27a4504)
Code Refactoring
- remove
JavaScriptMetadataProvider
(4e337cb) - remove
Reference.load(prop: keyof T)
signature (#5015) (32b48f7)
Features
- core: add
@EnsureRequestContext
decorator + rename@UseRequestContext
(5e088ae), closes #4009 - core: add
Collection.load()
method (8aa1ad1) - core: add
EagerProps
symbol to respect eager props on type level (dfcf1f8) - core: add
em.findAll()
with optionalwhere
option (#4946) (23b0551), closes #3982 - core: add
FindOptions.exclude
(#5024) (fe239cf) - core: add
GeneratedCacheAdapter
for production usage (#4167) (bd478af), closes #4164 - core: add
Hidden
type as an alternative toHiddenProps
symbol (#5009) (c047bb1) - core: add
HiddenProps
symbol as type-level companion forhidden: true
(7984769), closes #4093 - core: add
MikroORM.initSync()
helper (#4166) (8b1a1fa), closes #4164 - core: add
Opt
type as an alternative toOptionalProps
symbol (#4753) (8853904) - core: add
orm.checkConnection()
helper (#4961) (b868f02), closes #4959 - core: add
ScalarRef
andEntityRef
types to allow explicit control (1ef7856), closes #4907 - core: add
sql.now()
,sql.lower()
andsql.upper()
functions (#5044) (016fe63) - core: add
sql.ref()
helper (#4402) (b695811) - core: add cursor-based pagination via
em.findByCursor()
(#3975) (1e6825f) - core: add customizable
LoggerContext
with labeling support (#4233) (b985646), closes #4230 - core: add discovery hooks
onMetadata
andafterDiscovered
(#4799) (5f6c4f8) - core: add entity to identity map on
em.persist()
(1b09d26), closes #4905 - core: add global
serialization.forceObject
option (731087d), closes #4881 - core: add optional
Type.compareValues
method to allow custom comparators (732307a), closes #4870 - core: add support for indexes on JSON properties (#4735) (82c8629), closes #1230
- core: allow all
CountOptions
inCollection.loadCount()
(25d1851) - core: allow auto-discovery of base classes with
EntitySchema
(10cfd28) - core: allow class references in
subscribers
array (7c8f776), closes #4231 - core: allow configuring filters in
Reference.load()
andCollection.load()
(#5025) (06012f7), closes #4975 - core: allow defining
serialization.forceObject: true
on type level (#5045) (88eb3e5) - core: allow disabling colors via
colors
ORM config option (1bcaf09), closes #5037 - core: allow extending
EntityManager
(#5064) (6c363e7) - core: allow inferring populate hint from filter via
populate: ['$infer']
(#4939) (080fdbb), closes #1309 - core: allow M:1 and 1:1 relations in virtual entities (#4932) (164a69e)
- core: allow mapping database defaults from inline embeddables (#4384) (22ad61e), closes #3887
- core: allow overriding global logging options on per-query basis (#4273) (51b6250), closes #4223
- core: allow overriding ORM config path via
--config
(#3924) (2c929e0) - core: allow passing string values for
PopulateHint
enum (populateWhere
) (2bd21eb) - core: allow populating collections with references (#4776) (3da6c39), closes #1158
- core: allow setting logger context on EM level (#5023) (7e56104), closes #5022
- core: allow type-safe populate all via
populate: ['*']
(#4927) (7780f34), closes #4920 - core: allow using
Ref
wrapper on scalar properties (#4358) (f9c30f1) - core: allow using dataloader for references and collections (#4321) (8f4790f), closes #266
- core: allow using string values for
loadStrategy
andflushMode
(f4e4e3b) - core: auto-join M:1 and 1:1 relations with filters (#5063) (66a6b75), closes #4975
- core: improve validation of bidirectional 1:1 relations (7eb6ee6)
- core: infer property type from default value (#4150) (38be986), closes #4060
- core: make
em.insert/Many
strictly typed (require all properties) (01935e6) - core: native
BigInt
support (#4719) (31a905c) - core: re-export the core package from all drivers (#3816) (175c059)
- core: remove static require calls (#3814) (b58f476), closes #3743
- core: require
mappedBy
option for 1:m properties (716aa76) - core: require explicitly marked raw queries via
raw()
helper (#4197) (9c1b205) - core: respect
ignoreFields
on type level inwrap().toObject()
(15de7a0), closes #4198 - core: respect
schema
parameter inclientUrl
(#4998) (9176ee0), closes #4997 - core: respect naming strategy and explicit field names on embedded properties (#4866) (6151f3b), closes #4371 #2165 #2361
- core: respect updates to M:N inverse sides and batch them (#4798) (ec65001), closes #4564
- core: return
Loaded
type fromRef.load()
(bc3ffa9), closes #3755 - core: return single entity from
em.populate()
when called on single entity (4c4ec23) - core: rework serialization rules to always respect populate hint (#4203) (32d7c5f), closes #4138 #4199
- core: strict partial loading (#4092) (d5d8c2d), closes #3443
- core: support atomic updates via
raw()
helper (#4094) (1cd0d1e), closes #3657 - core: support mapping one column to different STI properties (#4769) (e8d391b), closes #2388 #4440
- core: throw when trying to iterate on a not initialized collection (2a3fd27), closes #3750
- core: validate abstract target in relation decorators (dddb901)
- core: validate duplicate field names (#4968) (71fead4), closes #4359
- core: validate missing relation decorator (af31b3b), closes #3807
- entity-generator: added ability to output type option in decorator (#4935) (2d1936a)
- entity-generator: allow generating scalar properties for FKs (#4892) (abad6ca), closes #4898
- entity-generator: allow local and global configuration of all options (#4965) (2876b8a)
- entity-generator: allow overriding generated entity file name (4ebc8e3), closes #5026
- entity-generator: detect more ManyToMany relations (#4974) (d0e3ac9)
- entity-generator: generate
OptionalProps
and other symbols forEntitySchema
(00f0a34) - mysql: support
order by nulls first/last
(#5021) (df75b24), closes #5004 - postgres: add support for native enums (#4296) (8515380), closes #2764
- postgres: add support for weighted tsvectors and a custom regconfig (#3805) (a0e2c7f), closes #3317
- query-builder: add support for lateral sub-query joins (99f87c4), closes #624
- query-builder: allow joining sub-queries (#4747) (613332c), closes #4429 #4549
- query-builder: respect discriminator column when joining STI relation (57b7094), closes #4351
- query-builder: support virtual entities (27f0c83), closes #5069
- schema: add options to
schema.ensureDatabase()
method to create/clear (6a12fe1) - sql: add native support for generated columns (#4884) (a928291)
- sql: print number of affected rows for insert and update queries (36336d9)
- sql: rework joined strategy to support the default
populateWhere: 'all'
(#4957) (e5dbc24) - sql: support
$some
,$none
and$every
subquery operators (#4917) (50d2265), closes #2916 - sql: use joined strategy as default for SQL drivers (#4958) (90ec766)
- sql: use returning statements for reloading version fields on update (0a3abd7)
Performance Improvements
- core: cache if entity has event listeners (cfa8d52)
- core: optimize handling of FK value propagation (f3d0ec5)
- core: speed up detection of constructor/toJSON parameters during discovery (a1288de)
BREAKING CHANGES
Please see the upgrading guide.
5.9.7 (2023-12-30)
Bug Fixes
- core: check for root entity properties in
em.canPopulate()
when using STI (b8fcf45), closes #5043 - core: fix eager loading detection with multiple populate hints for one property (da1daf5), closes #5057
- core: support pivot entities with autoincrement PK (e250634), closes #4988
- postgres: respect column length in down migrations (222e2b8), closes #5048
5.9.6 (2023-12-21)
Bug Fixes
- core: fix
assign
on collections of unloaded entities (b60e4ee) - core: fix extra updates with select-in strategy and composite FKs (c848f8c)
5.9.5 (2023-12-15)
Bug Fixes
- core: ensure eager loading on deeper levels work with joined strategy (cc5f476)
- core: fix extra updates for composite FKs that share a column (78772fb)
- core: fix infinite loop with
populate: true
andrefresh: true
(#5001) (9f63378) - core: fix returning statement hydration after
em.upsert
(a7e9a82), closes #4945 - core: respect context in virtual entity expression callback (84d42a7)
- postgres: allow using array operators (e.g.
@>
) with object arrays (6a5a1ef), closes #4973 - schema: improve json default diffing for down migrations (5bc19ba)
- sql: deduplicate keys in batch update queries (7de7a48)
5.9.4 (2023-11-17)
Bug Fixes
- cli: support
mikro-orm-esm
on windows (c491af9) - core: fix auto-refresh detection in
em.find
for inlined embedded properties (759b7b8), closes #4904 - core: support composite PKs in
em.upsertMany()
(85c38d4), closes #4923 - mysql: improve diffing of defaults for JSON columns (d92a440), closes #4926
- schema: do not inherit schema for FKs if not a wildcard entity (cc7fed9), closes #4918
- schema: respect explicit schema in FKs to STI entities (cc19ebb), closes #4933
- schema: respect up migration when detecting column renaming in down migration (d5af5bd), closes #4919
5.9.3 (2023-11-06)
Bug Fixes
- core: only check the same entity type when detecting early update/delete (fef7a1b), closes #4895
- core: return
DriverException
fromem.upsertMany()
(1ebfbdd), closes #4897 - core: fix populating relations with cycles via select-in strategy (d0b35da), closes #4899
5.9.2 (2023-11-02)
Bug Fixes
- core: fix partial loading of embedded properties with joined strategy (f887e77)
- core: ignore limit, offset and order in
em.count
on virtual entity (03a7b86) - mongo: fix support for
ignoreUndefinedInQuery
(cef26c5), closes #4891
5.9.1 (2023-10-31)
Bug Fixes
- core: propagate to owning side of 1:1 relation even if not initialized (9b2c9fe), closes #4879
- postgres: fix hydrating of serial properties via returning statement (620309c)
5.9.0 (2023-10-24)
Bug Fixes
- core: apply
convertToJSValueSQL
on composite FKs too (41425cb), closes #4843 - core: clean up removed entities from relations in identity map (1e3bb0e), closes #4863
- core: infer property type from
columnType
for non-inferrable types (e.g. unions withnull
) (6bc116a), closes #4833 - core: remove some computed properties from metadata cache (eb138ad)
- core: use write connection for fetching changes after upsert/upsertMany (#4872) (6b444ed), closes #4868
- query-builder: do not alias formula expressions used in
qb.groupBy()
(e27e4b9), closes #2929 - query-builder: respect
preferReadReplicas
inQueryBuilder
(22e140e), closes #4847 - serialization: run custom serializer on getters (#4860) (e76836e), closes #4859
Features
- core: allow ignoring
undefined
values inem.find
queries (#4875) (e163bfb), closes #4873 - core: create context from async orm instance (#4812) (fbf3a4d), closes #4805
- query-builder: respect
EntityManager
schema (#4849) (5bc12a9)
5.8.10 (2023-10-18)
Bug Fixes
- knex: fix populating M:N from inverse side with joined strategy (9f82e95)
- reflection: ensure complete stripping of relative paths with multiple leading slashes (#4844) (8a635c7)
5.8.9 (2023-10-15)
Bug Fixes
- core: ignore SQL convertor methods on object embeddables (92e1d6f), closes #4824
- core: respect database name in
clientUrl
of read replicas (015d4f4), closes #4813 - query-builder: merge raw join results in
qb.execute()
(#4825) (5a28e9b), closes #4816 #4741 - schema: skip changes of enum items on enum arrays (9accdf6), closes #476
5.8.8 (2023-10-11)
Bug Fixes
- core: do not rehydrate values provided to constructor (8ff3f65), closes #4790
- core: hydrate relations with
mapToPk
as scalars to support custom types (4118076), closes #4803 - postgres: escape array literal values containing backslash (#4797) (20179ec), closes #4796
Performance Improvements
5.8.7 (2023-10-05)
Bug Fixes
- core: ensure virtual relation properties have no effect on commit order (606d633), closes #4781
- core: fix conditions in
em.upsertMany
with composite keys (2f58556), closes #4786 - core: fix extra updates when nullable embedded properties contain FK (77ffa4f), closes #4788
- core: improve handling of nullable embedded properties (eae7e38), closes #4787
- schema: respect length of default value of datetime columns (cbc0c50), closes #4782
5.8.6 (2023-10-02)
Bug Fixes
- core: alias joins on non persistent properties (d70d323), closes #4773
- core: respect
disableContextResolution
option when forking (5964e52), closes #4717 #3338 - migrations: allow running migrations outside of main transaction (e0dfb0c), closes #4775
5.8.5 (2023-09-30)
Bug Fixes
- core: allow joining a formula property (1200e5b), closes #4759
- core: map virtual properties that shadow a regular property from joined results (d0b3698), closes #4764
- core: pin all internal dependencies (f4868ed), closes #4764
- core: support overlapping composite FKs with different nullability (208fbaa), closes #4478
- mongo: fix querying object embedded JSON properties (b38a327), closes #4755
- reflection: detect JSON properties defined with
Record
orDictionary
types (62740d1), closes #4755
5.8.4 (2023-09-27)
Bug Fixes
- core: fix recomputing of changesets when entity has unique properties (d03afad), closes #4749
- query-builder: fix mapping of complex joined results with cycles (a9846dd), closes #4741
Features
- core: add
EntityRepository.getEntityName()
method (#4745) (47bfedd) - core: allow setting default
schema
onEntityManager
(#4717) (f7c1ef2) - core: deprecate
UseRequestContext
decorator (#4744) (280733f)
5.8.3 (2023-09-24)
Bug Fixes
- core: do not skip
cjs/mjs/cts/mts
extensions during folder-based discovery (ce574a4), closes #4727 - core: ensure no duplicates exist in checks/indexes/hooks (fb523c8), closes #4733
- core: fix updating complex composite key entities via UoW (#4739) (898dcda), closes #4720
- knex: allow using knex query builder as virtual entity expression (#4740) (427cc88), closes #4628
- knex: hydrate nullable relations with joined strategy (8ddaa93), closes #4675
- mongo-migrations: fix logging of executed migrations (8ae7eeb), closes #4698
5.8.2 (2023-09-20)
Bug Fixes
- core: fix query processing when PK is falsy (#4713) (3624cb7)
- mongo-migrations: fix logging of executed migrations (2d9fc86), closes #4698
- query-builder: fix aliasing of joined embedded properties (24c4ece), closes #4711
Features
- core: allow to use
.ts
files as configuration withoutts-node
(#4702) (bda7eca), closes #4701 - entity-generator: generate
PrimaryKeyProp
andPrimaryKeyType
symbols (605446a)
5.8.1 (2023-09-12)
Bug Fixes
- core: ensure entity is not in persist stack after
em.insert/Many()
is called (94eed5e), closes #4692 - core: ensure merging of data to already loaded entities won't fail in some cases (f6e8204), closes #4688
- core: fix merging of collections loaded via joined strategy (b4a0260), closes #4694
- core: try to fix merging of large collections loaded via joined strategy (faae84e), closes #4694
5.8.0 (2023-09-10)
Bug Fixes
- core: default baseUrl value to '.' when registering ts-node (#4680) (cc0fc5f), closes #4679
- core: ensure partial loading respects advanced mapped type methods (72554fd), closes #4622
- core: fix assigning collection items with
updateNestedEntities: false
(e1bfd20) - core: fix metadata cache for
@Check()
with callback signature (44d973e), closes #4505 - core: fix removing entity that has an inverse relation with M:1
owner
property (fbed4a6), closes #4578 - core: ignore null values of unknown properties in
assign()
(a600f55), closes #4566 - core: map property names to column names in
qb.onConflict()
(e38d126), closes #4483 - core: remove old items from 1:m collections via
set()
even if not initialized (b03e165) - core: respect explicit schema name of pivot tables (af74491), closes #4516
- core: respect filters with joined loading strategy (#4683) (847c35a), closes #704 #2440
- core: support calling
em.findAndCount()
on virtual entities withorderBy
(7f328ac), closes #4628 - core: support calling
em.insertMany()
with empty array (2f65bc8), closes #4640 - core: use join on conditions for
populateWhere
(#4682) (99177cc), closes #3871 - entity-generator: respect
precision
andscale
in numeric column type (3a52c39) - mysql: fix extra updates on entities with non-primary autoincrement property (5d6ebe3), closes #4577
- query-builder: apply join condition to the target entity in M:N relations (c78d812), closes #4644
- query-builder: make
QBFilterQuery
type more strict (755ef67) - schema: respect
columnType
on enum properties (#4601) (0eae590)
Features
- cli: add
--drop-db
flag tomigration:fresh
andschema:fresh
(cf1db80), closes #4569 - core: add
clear
option toem.transactional()
(01d1ad7) - core: add
Collection.isEmpty()
method (#4599) (2d8d506) - core: add
Collection.slice()
method (#4608) (7c99c37) - core: add
Collection
helpersmap/filter/reduce/exists/findFirst/indexBy
(3ba33ac), closes #4592 - core: allow disabling duplicate entities discovery validation (#4618) (3ff0dda)
- core: allow enabling result cache globally (5876c99), closes #4656
- core: allow fine-grained control over
em.upsert()
(#4669) (ab0ddee), closes #4325 #4602 - core: allow global config option for
disableIdentityMap
(ef32b14), closes #4653 - core: respect
batchSize
inem.upsertMany()
(4a21c33), closes #4421 - entity-generator: allow skipping some tables or columns (e603108), closes #4584
- migrations: add
Migration.getEntityManager()
helper (79af75c), closes #4605 - mongo: support indexes on embedded properties (040896e), closes #2129
- sql: add
readOnly
option toem.begin()
andem.transactional()
(86bb7d4) - sql: allow specifying query comments (06d4d20)
5.7.14 (2023-07-27)
Bug Fixes
- core: ensure JSON arrays are correctly handled (5327bcc), closes #4555
- core: inferring JSON type based on
columnType
when mapping to array (96d87ba), closes #4548 - entity-generator: use ref instead of wrappedReference (#4559) (be02aa4)
- mongo: do not create collections for embeddable entities (0759df0), closes #4495
- seeder: allow run method to return without promise (#4541) (8012507)
5.7.13 (2023-07-16)
Bug Fixes
- core: deprecate
wrappedReference
on m:1 decorator options (d7f362e) - core: do not fail when detecting mapped type for enum columns (b94048b), closes #2323
- core: fix handling shared columns in composite foreign keys (fbb6958)
- core: fix multiple
?
in fulltext fields updates (9c9915e), closes #4484 - core: fix updating composite key entities via flush (733cb80), closes #4533
- core: respect
persist: false
on relations (a127fff), closes #4504 - migrations: support reverting migrations that had extenion in the database (72df9ad), closes #4528
- mongo: drop migrations table when requested (278ba3a), closes #4513
- postgres: fix hydration of 1:1 properties when entity has version fields (474eb73), closes #4497
- sqlite: allow using
clientUrl
without ahost
(#4447) (9a01bbd) - sqlite: fix processing queries with large parameters (48ee8c2), closes #4526
- sql: schema not inherited in query with relations (#4477) (b680477), closes #4472
5.7.12 (2023-06-10)
Bug Fixes
- core: allow async filter callbacks in
em.addFilter()
on type level (308c45b) - core: fallback to direct property access (320c52f), closes #4434 #4216
- core: fix extra updates when
forceEntityConstructor
enabled (41874eb), closes #4426 - core: fix returning clause for upsert with embeddables (#4427) (b9682f0)
- core: respect
undefined
when assigning to object properties (217ff8f), closes #4428 - core: respect falsy values in
em.upsert
(ef22b21), closes #4420 - mongo: allow saving self-references inside M:N properties in one flush (c1b5fc4), closes #4431
Features
- core: add
em.getMetadata(Entity)
shortcut (e5834b4) - core: support Uint8Array (#4419) (01a9c59), closes #4418
5.7.11 (2023-06-01)
Bug Fixes
- cli: expose missing
migration:check
command (#4388) (79e128e) - core: fix change tracking of optional properties with
forceUndefined
(9303c3f), closes #4412 - core: fix populating relations in parallel via
Promise.all
(#4415) (f4127a7), closes #4213 #4343
5.7.10 (2023-05-23)
Bug Fixes
- core: exclude collections from
returning
clause fromem.upsert
(e342449), closes #4382 - core: re-export
Reference
class asRef
(50eea37), closes #4161 - core: respect
skipNull
when serializing object properties/embeddables (f27ee9a), closes #4383
Features
- core: add
meta
toEventArgs
to the upsert events (ed431ea)
Performance Improvements
5.7.9 (2023-05-22)
Bug Fixes
Performance Improvements
5.7.8 (2023-05-21)
Bug Fixes
- core: ensure
em.upsert
returns initialized entity (#4370) (bad0b37), closes #4242 - core: ensure correct number of results is logged in SQL drivers (e3cd184)
- core: ensure strict type-checking of enum queries (8f8464a)
- query-builder:
qb.clone()
shouldn't ignoregroupBy
andhaving
clauses (7127ff6)
Features
- query-builder: add
qb.returning()
(b5ab66b) - query-builder: allow partial loading via
qb.(left/inner)JoinAndSelect()
(22c8c84), closes #4364
5.7.7 (2023-05-14)
Bug Fixes
- core: deprecate
@Subscriber()
decorator (033b71d) - core: revert the
const enums
as they break projects withisolatedModules
(8b23674), closes #4350 - knex: remove constraints from knex's peer dependencies (ce81071)
- query-builder: do not enable query pagination when explicit
groupBy
is set (921251a), closes #4353
Features
- core: add
options
argument to filter callback (c57ee5e), closes #4352 - query-builder: validate unknown alias when explicitly joining (8d4a83a), closes #4353
5.7.6 (2023-05-13)
Bug Fixes
- core: allow
em.populate()
on lazy formula properties (5c6bb13) - core: ensure database values are used in the identity map keys (46b5e3a), closes #4335
- core: fix re-populating relations with
refresh: true
(74b6a98), closes #4339
Features
Performance Improvements
- core: define some enums as const enums, so they get inlined (3cb43ba)
5.7.5 (2023-05-09)
Bug Fixes
- core: deprecate
wrappedReference
andIdentifiedReference
(ab79832) - core: detect early deletes for compound unique constraints (f9530e4), closes #4305
- core: fix extra updates caused by bigint type (2acd25e), closes #4249
- core: fix extra updates caused by property initializers when
forceEntityConstructor
is enabled (7ee883d), closes #4323 - core: respect schema name when checking duplicate table names (5b89b00), closes #4332
- mongo: sorting with UnderscoreNamingStrategy (#4314) (a5b0f94), closes #4313
- postgres: improve enum/check constraint inspection in schema diffing (6c44b42), closes #4312
5.7.4 (2023-05-01)
Bug Fixes
- core: expand PK conditions inside top level operators (305ce5d), closes #4222
- core: fix extra updates when caching inlined embedded entities (3dc3b32), closes #4295
- core: fix object merging in
assign
helper when current value is scalar (c012f95), closes #4290 - core: only consider valid query as tuple comparison (7212a53), closes #4220
- migrations: respect custom migration name in migration class names (#4294) (c402a99)
5.7.3 (2023-04-28)
Bug Fixes
- core: merge returned values to the initial entity snapshot (e123076), closes #4284
- postgres: do not convert
date
column type toDate
object automatically (a7d1d09), closes #4194 #4276
Features
- core: add
beforeUpsert
andafterUpsert
events (db9ff09), closes #4282 - core: allow creating DELETE changesets via
uow.computeChangeSet()
(61479b6), closes #4280 - core: allow disabling validation for duplicate
tableName
(dfb87bf)
5.7.2 (2023-04-25)
Bug Fixes
- cli: await the yargs.parse call in esm.ts (#4272) (dcdf70a)
- core: don't skip updates from propagation triggered via
em.create()
(30778c3), closes #4209 - core: quote JSON property paths if they contain special characters (a94bbce), closes #4264
- core: respect
forceUndefined
in the original entity data (d2d9cc0), closes #4262 #4266 - core: respect
serialize()
skipNull
option inside embeddables (4cf7669), closes #4263 - migrations: allow generating named initial migration (01d6a39), closes #4271
5.7.1 (2023-04-25)
Bug Fixes
5.7.0 (2023-04-23)
Bug Fixes
- core: clean up bidirectional references after removal of entity (bfd3840), closes #4234
- core: detect
JsonType
based oncolumnType
(#4252) (2e01622), closes #4229 - core: do not try to propagate changes to
mapToPk
relations (7028890), closes #4254 - core: fix mapping of joined relations with buffer PKs (8e9e7ee), closes #4219
- core: merge env vars with explicit configuration recursively (392a623), closes #4235
- core: prevent tuple type properties from being converted to array when serializing entities (#4205) (04ad72e)
- core: propagate changes from extra updates back to the original changeset (77f5c14), closes #4245
- core: rework JSON value processing (#4194) (5594c46), closes #4193
- mariadb: use
json_extract
when querying JSON fields (ca96acc) - query-builder: fix pagination when PK uses
BigIntType
(b789031), closes #4227 - query-builder: support
onConflict().ignore()
without parameters (3a3b0bd), closes #4224 - schema: fix comparing default value of JSON properties (41277a1), closes #4212