Releases: typeorm/typeorm
Releases · typeorm/typeorm
0.3.25
What's Changed
- docs: use correct SQL statements in softDelete/restore comments by @sgarner in #11489
- fix: resolve alias or table name in upsert and orUpdate for PostgreSQL driver conditionally by @mmarifat in #11452
- feat(spanner): use credentials from connection options by @denes in #11492
- feat: add upsert support for Oracle, SQLServer and SAP HANA by @Yuuki-Sakura in #10974
- fix: handle limit(0) and offset(0) correctly in SelectQueryBuilder by @yeonghun104 in #11507
- fix: add collation update detection in PostgresDriver by @asn6878 in #11441
- feat: add typesense/docsearch-scraper by @gioboa in #11424
- chore: improve linting by @alumni in #11510
- chore: improve linting (fixup) by @alumni in #11511
- docs: new website initial commit by @naorpeled in #11408
- fix: fix up doc search workflow by @gioboa in #11513
- chore: update workflows to ignore changes in docs directory by @dlhck in #11518
- feat(docs): add Plausible analytics script to Docusaurus config by @dlhck in #11517
- docs: add note about using YugabyteDB by @mguida22 in #11521
- chore(docs): improve website generation config by @alumni in #11527
- fix(tree-entity): closure junction table primary key definition should match parent table by @gongAll in #11422
- docs: add heading to Getting Started page by @sgarner in #11531
- fix: Multiple relations with same columns cause invalid SQL to be generated by @yevhen-komarov in #11400
- fix: fix null pointer exception on date array column comparison by @mnbaccari in #11532
- chore(ci): simplify workflows by @alumni in #11530
- fix: improve async calls on disconnect by @alumni in #11523
New Contributors
- @mmarifat made their first contribution in #11452
- @yeonghun104 made their first contribution in #11507
- @asn6878 made their first contribution in #11441
- @gongAll made their first contribution in #11422
Full Changelog: 0.3.24...0.3.25
0.3.24
What's Changed
- feat: add tagged template for executing raw SQL queries by @Newbie012 in #11432
- chore: Add husky and lint-staged by @maxbronnikov10 in #11448
- fix: resolve pkg.pr.new issue by @naorpeled in #11463
- perf: improve save performance during entities update by @lotczyk in #11456
- refactor: remove unused NamingStrategyNotFoundError by @mguida22 in #11462
- chore: add note about breaking change in 0.3.23 by @mguida22 in #11469
- build: include db version in coveralls flag-name by @mguida22 in #11461
- chore: include warning about update({}) in changelog by @sgarner in #11471
- feat: add updateAll and deleteAll methods to EntityManager and Repository APIs by @sgarner in #11459
- Fix/11466 mssql find operator by @christian-forgacs in #11468
- feat(spanner): support insert returning by @denes in #11460
- chore: clarify commit practices by @mguida22 in #11472
- fix(mssql): avoid mutating input parameter array values by @sgarner in #11476
- fix: capacitor driver PRAGMA bug by @AlexAzartsev in #11467
- chore: version 0.3.24 by @mguida22 in #11478
New Contributors
- @denes made their first contribution in #11460
- @AlexAzartsev made their first contribution in #11467
Full Changelog: 0.3.23...0.3.24
0.3.23
⚠️ Note on a breaking change
This release includes a technically breaking change (from this PR) in the behaviour of the delete
and update
methods of the EntityManager and Repository APIs, when an empty object is supplied as the criteria:
await repository.delete({})
await repository.update({}, { foo: 'bar' })
- Old behaviour was to delete or update all rows in the table
- New behaviour is to throw an error:
Empty criteria(s) are not allowed for the delete/update method.
Why?
This behaviour was not documented and is considered dangerous as it can allow a badly-formed object (e.g. with an undefined id) to inadvertently delete or update the whole table.
When the intention actually was to delete or update all rows, such queries can be rewritten using the QueryBuilder API:
await repository.createQueryBuilder().delete().execute()
// executes: DELETE FROM table_name
await repository.createQueryBuilder().update().set({ foo: 'bar' }).execute()
// executes: UPDATE table_name SET foo = 'bar'
An alternative method for deleting all rows is to use:
await repository.clear()
// executes: TRUNCATE TABLE table_name
What's Changed
- chore: Fix publish command by @michaelbromley in #11379
- build(deps): bump tar-fs from 2.1.1 to 2.1.2 by @dependabot in #11370
- feat: add new foreign key decorator, and entity schemas options by @yevhen-komarov in #11144
- chore: fix changelog generation by @alumni in #11381
- feat: Build ESM migrations for JS by @w3nl in #10802
- docs(entity-subscribers): document primary key availability in UpdateEvent by @jovanadjuric in #11308
- test: remove unused type parameter from decorators by @mguida22 in #11412
- feat: Add query timeout support for MySql by @iliagrvch in #10846
- Chore: Added logging to the Entity Listener Metadata by @JackNytely in #11234
- Propagate
aggregate
method's generic parameter to its returned cursor by @pringon in #10754 - refactor: define Position type for GeoJSON objects by @knoid in #11259
- perf(query-runner): use Date.now() intead of +new Date() by @Samuron in #10811
- feat: add FormattedConsoleLogger by @w3nl in #11401
- docs: update repository additional chunk option usage example by @knicefire in #11282
- docs: Correct "its" -> "it's" by @mdippery in #11428
- fix: prevent error when replication is undefined by @caiquecastro in #11423
- fix: change how array columns are compared on column changed detection by @mnbaccari in #11269
- build: setup testing matrix for postgres 14 and 17 by @mguida22 in #11433
- fix: beforeQuery promises not awaited before query execution by @TanguyPoly in #11086
- fix(sap): cleanup after streaming by @alumni in #11399
- feat: release PR releases using pkg.pr.new by @naorpeled in #11434
- docs: clarify where to add new tests by @mguida22 in #11438
- fix: update/delete/softDelete by criteria of condition objects by @maxbronnikov10 in #10910
- chore: Version 0.3.23 by @michaelbromley in #11439
New Contributors
- @yevhen-komarov made their first contribution in #11144
- @w3nl made their first contribution in #10802
- @iliagrvch made their first contribution in #10846
- @JackNytely made their first contribution in #11234
- @pringon made their first contribution in #10754
- @knoid made their first contribution in #11259
- @Samuron made their first contribution in #10811
- @knicefire made their first contribution in #11282
- @caiquecastro made their first contribution in #11423
- @mnbaccari made their first contribution in #11269
- @TanguyPoly made their first contribution in #11086
- @maxbronnikov10 made their first contribution in #10910
Full Changelog: 0.3.22...0.3.23
0.3.22
What's Changed
- fix: transaction not ending correctly by @alumni in #11264
- docs: add "How to use Vite for the backend" entry to faq by @robkorv in #11306
- chore: don't use version in docker-compose files by @assapir in #11320
- fix(sap): pass the configured schema to the db client by @alumni in #11321
- fix(sap): incorrect handling of simple array/json data type by @alumni in #11322
- fix: add VirtualColumn to model shim by @FrancoisDeBellescize in #11331
- fix: remove unnecessary import from JS migration by @TkachenkoDmitry in #11327
- test: rename tests to better describe the case by @OSA413 in #11280
- chore(test): set timezone to UTC by @douglascayers in #11247
- ci: add CodeQL workflow by @naorpeled in #11337
- fix: empty objects being hydrated when eager loading relations that have a
@VirtualColumn
by @alumni in #10927 - test: fix and run tests on Windows by @OSA413 in #11257
- feat(postgres): support macaddr8 column type by @chkjohn in #11345
- build: run format in ci by @mguida22 in #11342
- style: lint repository by @alumni in #11346
- fix: ensure correct MSSQL parameter conversion in where conditions by @sudhirt4 in #11298
- chore: update dependencies by @alumni in #11339
- fix: FindOptionsSelect to use correct type when property is an object by @MGB247 in #11355
- refactor: database server version fetching & comparison by @alumni in #11357
- build: improve test workflow by @alumni in #11361
- build: setup SAP HANA tests by @alumni in #11347
- fix: export QueryEvent before/after types by @nover in #10688
- fix: mongodb connection options by @mohd-akram in #11310
- feat: Incorporate wrapping metadata for MongoDB client instances by @alexbevi in #11214
- fix: bulk insert NULL values in Oracle (#11362) by @ertl in #11363
- fix: remove unnecessary spaces in message when running non-fake migrations by @zyoshoka in #10809
- fix: sql escape issues identified by CodeQL by @alumni in #11338
- fix(sap): normalize deprecated/removed data types in SAP HANA Cloud by @alumni in #11356
- fix: version detection for Postgres derived variants by @alumni in #11375
- feat: Support Expo SQLite Next by @pmk1c in #11107
- docs: add comment explaining select version() by @mguida22 in #11376
- fix: incorrect table alias in insert orUpdate with Postgres driver by @Ben1306 in #11082
- chore: Add package publishing workflow by @michaelbromley in #11377
- chore: Bump version to v0.3.22 and generate changelog by @michaelbromley in #11378
New Contributors
- @robkorv made their first contribution in #11306
- @assapir made their first contribution in #11320
- @FrancoisDeBellescize made their first contribution in #11331
- @TkachenkoDmitry made their first contribution in #11327
- @douglascayers made their first contribution in #11247
- @chkjohn made their first contribution in #11345
- @sudhirt4 made their first contribution in #11298
- @MGB247 made their first contribution in #11355
- @alexbevi made their first contribution in #11214
- @zyoshoka made their first contribution in #10809
- @pmk1c made their first contribution in #11107
- @Ben1306 made their first contribution in #11082
Full Changelog: 0.3.21...0.3.22
0.3.21
What's Changed
- docs: update the custom-repository.md file in the docs/zh_CN directory by @OrangeSheepCool in #10676
- chore(TypeORM): Create test case to uncover TypeORM composite key save issue by @jeisberg in #10672
- Moved
reflect-metadata
topeerDependencies
and set version to"^0.1.14 || ^0.2.0"
by @OSA413 in #10779 - chore(docs): add announcement by @dlhck in #11125
- chore: Replace Slack links with Discord by @michaelbromley in #11153
- test: Add GitHub Actions for tests CI/CD by @OSA413 in #11157
- test: remove restriction of CI/CD runs for fork branches by @OSA413 in #11173
- Split SQLite tests and fix better-sqlite3 by @OSA413 in #11174
- style: apply formatting by @OSA413 in #11175
- chore: update some packages and run npm audit fix by @OSA413 in #11181
- docs(datasource): some sentence updated for datasource doc by @albasyir in #11182
- Remove CircleCI by @stim371 in #11189
- test: Expand node version matrix to node16, node18, and node20 by @OSA413 in #11183
- test: redo cockroachdb to service-container GHA and update its version to latest (24) by @OSA413 in #11190
- remove github issues as a suggested place for questions by @mguida22 in #11194
- Remove links to defunct Vesper project by @stim371 in #11195
- Lint on GitHub actions by @stim371 in #11177
- docs: Refine Markdown Language for Better Clarity and Grammar by @albasyir in #11207
- docs: update QueryResultCache method descriptions by @mguida22 in #11192
- chore: migrate to ESLint flat config by @alumni in #11205
- Update select-query-builder.md by @madmaxdios in #11166
- refactor: use node:fs/promises by @alumni in #11206
- chore(license): update copyright year to 2025 by @maxktz in #11223
- Update many-to-many-relations.md by @standage-thanh in #10699
- Typo - setOnLock -> setOnLocked by @felipensp in #11120
- docs: one-to-one relation explanation fix by @pato1713 in #11151
- Update README.md by @jonathanberger in #11089
- docs(multiple-data-sources.md): fix spacing by @jhi721 in #11052
- docs: update deprecated naming by @puleugo in #11017
- Docs: fix connection options description by @os-moussao in #10935
- docs: add Lock tables in Set Locking by @youngkiu in #10921
- docs: removed dead link about using typeorm with DI from faq.md by @giom-l in #10886
- docs: update find-options.md by @NikolayKrishchuk in #10877
- refactor: update EntityManager.ts by @eltociear in #10875
- docs: documentation for parameters in Repository, DataSource, EntityManager query methods by @vlahovivan in #10848
- docs: improve OneToOne description by @pavlokolodka in #10798
- Update eager-and-lazy-relations.md by @kunalrgarg in #10791
- docs: Include info about using soft delete in Repository API by @sanjacob in #10722
- Update mongodb.md by @LucoEldritch in #10718
- docs: fix imports in 'Or' find operator example by @myypo in #10689
- docs: clarify adjacency list by @DevAhmedRadwan in #10664
- chore(test): Add Coverage on Coveralls by @OSA413 in #11225
- perf: improve results transformer performance by @mohd-akram in #10349
- Rename SubjectTopoligicalSorter as SubjectTopologicalSorter by @ocozalp in #11074
- Fix maximum call stack error by @mgorunuch in #10733
- refactor: added --cache to prettier call by @RohanTalip in #10865
- Update select-query-builder.md by @peruzzoarthur in #10763
- fix: update mssql allowed version to fix vulnerability. by @wy193777 in #10933
- refactor: use sql-highlight instead of cli-highlight by @alumni in #11221
- Add support for better-sqlite3 v10 and 11 by @JoshMarkF in #11096
- chore: replace CircleCI badge with GitHub Actions badge by @OSA413 in #11230
- chore: Add new logo by @dlhck in #11276
- fix(npm-readme): resolve missing image file by @naorpeled in #11290
- fix(npm-readme): resolve missing image file pt. 2 by @naorpeled in #11291
- Update relations.md by @madmaxdios in #11161
- Give the DEVELOPER.md documentation a pass by @alper in #11289
- docs: add performance and optimizing by @ngxquang in #11068
- docs: fix missing DataSource in migrations config by @maciej-ka in #11249
- docs: correct "it's" -> "its" by @mdippery in #11300
- Fix release issues by @michaelbromley in #11303
- refactor: use ansis instead of chalk by @alumni in #11263
- chore: Update eager-and-lazy-relations.md for better readability. by @joeldmyers in #10757
- chore: Bump version 0.3.21 by @michaelbromley in #11314
New Contributors
- @OrangeSheepCool made their first contribution in #10676
- @jeisberg made their first contribution in #10672
- @OSA413 made their first contribution in #10779
- @dlhck made their first contribution in #11125
- @albasyir made their first contribution in #11182
- @stim371 made their first contribution in #11189
- @madmaxdios made their first contribution in #11166
- @maxktz made their first contribution in #11223
- @standage-thanh made their first contribution in #10699
- @felipensp made their first contribution in #11120
- @pato1713 made their first contribution in #11151
- @jonathanberger made their first contribution in #11089
- @jhi721 made their first contribution in #11052
- @puleugo made their first contribution in #11017
- @os-moussao made their first contribution in #10935
- @giom-l made their first contribution in #10886
- @NikolayKrishchuk made their first contribution in #10877
- @eltociear made their first contribution in #10875
- @vlahovivan made their first contribution in #10848
- @kunalrgarg made their first contribution in #10791
- @sanjacob made their first contribution in #10722
- @LucoEldritch made their first contribution in #10718
- @myypo made their first contribution in #10689
- @DevAhmedRadwan made their first contribution in #10664
- @ocozalp made their first contribution in #11074
- @mgorunuch made their first contribution in #10733
- @peruzzoarthur made their first contribution in #10763
- @JoshMarkF made their first contribution in #11096
- @naorpeled made their first contribution in #11290
- @alper made their first contribution in #11289
- @ngxquang made their first contribution in #11068
- @maciej-ka made their first contribution in #11249
- @mdippery made their first contribution in #11300
- @joeldmyers ma...
0.3.20
Bug Fixes
- added missing parentheses in where conditions (#10650) (4624930), closes #10534
- don't escape indexPredicate (#10618) (dd49a25)
- fallback runMigrations transaction to DataSourceOptions (#10601) (0cab0dd)
- hangup when load relations with relationLoadStrategy: query (#10630) (54d8d9e), closes #10481
- include asExpression columns in returning clause (#10632) (f232ba7), closes #8450 #8450
- multiple insert in SAP Hana (#10597) (1b34c9a)
- resolve issue CREATE/DROP Index concurrently (#10634) (8aa8690), closes #10626
- type inferencing of EntityManager#create (#10569) (99d8249)
Features
- add json type support for Oracle (#10611) (7e85460)
- add postgres multirange column types (#10627) (d0b7670), closes #10556
- add table comment for postgres (#10613) (4493db4)
Reverts
0.3.19
0.3.18
Bug Fixes
- add BaseEntity to model-shim (#10503) (3cf938e)
- add error handling for missing join columns (#10525) (122c897), closes #7034
- add missing export for View class (#10261) (7adbc9b)
- added fail callback while opening the database in Cordova (#10566) (8b4df5b)
- aggregate function throw error when column alias name is set (#10035) (022d2b5), closes #9927
- backport postgres connection error handling to crdb (#10177) (149226d)
- bump better-sqlite3 version range (#10452) (75ec8f2)
- caching always enabled not caching queries (#10524) (8af533f)
- circular dependency breaking node.js 20.6 (#10344) (ba7ad3c), closes #10338
- correctly keep query.data from ormOption for commit / rollback subscribers (#10151) (73ee70b)
- default value in child table/entity column decorator for multiple table inheritance is ignored for inherited columns (#10563) (#10564) (af77a5d)
- deletedAt column leaking as side effect of object update while creating a row (#10435) (7de4890)
- empty objects being hydrated when eager loading relations that have a
@VirtualColumn
(#10432) (b53e410), closes #10431 - extend GiST index with range types for Postgres driver (#10572) (a4900ae), closes #10567
- ignore changes for columns with
update: false
in persistence (#10250) (f8fa1fd), closes #10249 - improve helper for cli for commands missing positionals (#10133) (9f8899f)
- loading datasource unable to process a regular default export (#10184) (201342d), closes #8810
- logMigration has incorrect logging condition (#10323) (d41930f), closes #10322 #10322
- ManyToMany ER_DUP_ENTRY error (#10343) (e296063), closes #5704
- migrations on indexed TIMESTAMP WITH TIME ZONE Oracle columns (#10506) (cf37f13), closes #10493
- mongodb - undefined is not constructor (#10559) (ad5bf11)
- mongodb resolves leaked cursor (#10316) (2dc9624), closes #10315
- mssql datasource testonborrow not affecting anything (#10589) (122b683)
- nested transactions issues (#10210) (25e6ecd)
- prevent using absolute table path in migrations unless required (#10123) (dd59524)
- remove
date-fns
in favor ofDayJs
(#10306) (cf7147f) - remove dynamic require calls (#10196) (a939654)
- resolve circular dependency when using Vite (#10273) (080528b)
- resolve issue building eager relation alias for nested relations (#10004) (c6f608d), closes #9944
- resolve issue of generating migration for numeric arrays repeatedly (#10471) (39fdcf6), closes #10043
- resolve issue queryBuilder makes different parameter identifiers for same parameter (#10327) (6c918ea), closes #7308
- resolve issues on upsert (#10588) (dc1bfed), closes #10587
- scrub all comment end markers from comments (#10163) (d937f61)
- serialize bigint when building a query id #10336 (#10337) (bfc1cc5)
- should automatically cache if alwaysEnable (#10137) (173910e), closes #9910
- SQLite simple-enum column parsing (#10550) (696e688)
- update UpdateDateColumn on upsert (#10458) (fdb9866), closes #9015
- upgrade ts-node version to latest(10.9.1) version (#10143) (fcb9904)
- using async datasource to configure typeorm (#10170) (fbd45db)
Features
0.3.17
0.3.16
0.3.16 (2023-05-09)
Bug Fixes
- add
trustServerCertificate
option toSqlServerConnectionOptions
(#9985) (0305805), closes #8093 - add directConnection options to MongoDB connection (#9955) (e0165e7)
- add onDelete option validation for oracle (#9786) (938f94b), closes #9189
- added instanceName to options (#9968) (7c5627f)
- added transaction retry logic in cockroachdb (#10032) (607d6f9)
- allow json as alias for longtext mariadb (#10018) (2a2bb4b)
- convert the join table ID to the referenceColumn ID type (#9887) (9460296)
- correct encode mongodb auth credentials (#10024) (96b7ee4), closes #9885
- create correct children during cascade saving entities with STI (#9034) (06c1e98), closes #7758 #7758 #9033 #9033 #7758 #7758
- express option bug in init command (#10022) (5be20e2)
- for running cli-ts-node-esm use exit code from child process (#10030) (a188b1d), closes #10029
- mongodb typings breaks the browser version (#9962) (99bef49), closes #9959
- RelationIdLoader has access to queryPlanner when wrapped in transaction (#9990) (21a9d67), closes #9988
- resolve duplicate subscriber updated columns (#9958) (3d67901), closes #9948
- select + addOrderBy broke in 0.3.14 (#9961) (0e56f0f), closes #9960
- support More/LessThanOrEqual in relations (#9978) (8795c86)