5213 Commits

Author SHA1 Message Date
Umed Khudoiberdiev
4ec04fa120
feat: added opaque types support over primitives in find-options (#9560)
* added opaque types support over primitives in find-options
* removed lock-verify because of its deprecation
* fixing auto type mapping
2022-11-21 23:24:30 +05:00
Darek
85fa9c6e7d
fix: explicitly define property for entity relation as enumerable (#9437)
In some environments it seems like entity object was created with columns values set to undefined, thus Object.defineProperty uses already defined value for enumerable - true.
    Which leads to RawSqlResultsToEntityTransformer.transform() run getters on relation fields (as they were enumerable) resolving the promises - running queries which eventually leads to the Free memory exhaustion on the machine :)

    Closes: #6631
2022-11-05 14:23:42 +05:00
Michael Wolz
4a36d0e8c1
fix: boolean parameter escape in SQLiteDriver (#9400)
* fix: sqlite boolean parameter escape

sqlite does not support boolean parameters. Even though sqlite is able to transform true to 1 and false to 0 there might be some limitations with other implementations that build up on this.

Fixes: #1981 (again)

* fix: remove obsolete where boolean value transformation

3cbbe90c already handles the boolean value transformation so it is not necessary to have additional code in the query runner for handling this

* test: add test cases for sqlite query parameter escape

* fix typo
2022-11-05 13:56:51 +05:00
Miles Egan
6eb674bb9d
fix: Mark array arguments to find operators as read-only (#9474)
Co-authored-by: AlexMesser <dmzt08@gmail.com>
2022-11-05 13:35:55 +05:00
PeterTran
19536edc39
fix: fix ormUtils prototype check crashing on null prototype (#9517) 2022-11-05 13:21:54 +05:00
Marvin Kilp
38e0eff18a
fix: resolve issue with migrations and unsigned int columns in aurora-data-api (#9478)
* fix: resolve issue with migrations and unsigned int columns in aurora-data-api

Closes: #9477

* refactor: fix prettier

* refactor: fix prettier again
2022-11-04 17:23:49 +05:00
Jeffyter Saraiva
efb4168840
fix: resolve nameless TableForeign on drop foreign key (#9460)
Closes #9432
2022-11-04 17:13:57 +05:00
dependabot[bot]
2e1c9fd94f
build(deps): bump ansi-regex from 3.0.0 to 5.0.1 (#9522)
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-04 16:51:58 +05:00
lucas
5253c8f5a6
docs: add examples in soft delete doc (#9402) 2022-11-04 16:27:13 +05:00
Ville Laitila
c053257bbe
test: old name fixed in test case name (#9428)
syncSchema was renamed to synchronize but nobody
updated the test case name.
2022-11-04 16:23:17 +05:00
Sebastiaan Nijland
16c1841c18
docs: update incorrect link (#9431)
* docs: update incorrect link

The link to the vesper framework was incorrect - it now points to the repository on github, which does seems to be inactive but at least the link now works.

* docs: add accidentally removed div
2022-11-04 16:20:18 +05:00
Bikram Suwal
b5ff79fc3f
docs: fix decorator for @AfterRecover() (#9504)
### `@AfterRecover`

You can define a method with any name in the entity and mark it with `@AfterRecover`
and TypeORM will call it after the entity is recovered using repository/manager `recover`.
Example:

```typescript
@Entity()
export class Post {
    @AfterRecover()
    updateStatus() {
        this.status = "recovered"
    }
}
```
`@AfterSoftRemove()` should be `@AfterRecover`
2022-11-04 16:13:51 +05:00
Warwick
66acec8c0c
docs: update one-to-one-relations.md (#9456)
One to one documentation is referring to the wrong entity
2022-11-04 15:58:14 +05:00
Geonu Lim
1194448fc5
docs: fix typo in readme_ko.md (#9448)
Fixed wrong typo!
2022-11-04 15:57:19 +05:00
dependabot[bot]
8883235994
build(deps): bump @xmldom/xmldom from 0.7.5 to 0.7.8 (#9514)
Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.7.5 to 0.7.8.
- [Release notes](https://github.com/xmldom/xmldom/releases)
- [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xmldom/xmldom/compare/0.7.5...0.7.8)

---
updated-dependencies:
- dependency-name: "@xmldom/xmldom"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-04 15:55:16 +05:00
Karim
ab7ed9c758
docs: fix typo in migrations doc (#9499)
Datasoure ==> Datasource
2022-11-04 15:53:45 +05:00
Rlok
f9a961265e
docs: fix typo of AfterRecover example (#9513) 2022-11-04 15:53:23 +05:00
Simon Garner
1903af741d
docs: add typeorm-relations to Extensions section (#9521) 2022-11-04 15:52:25 +05:00
Julian Pömp
cdabaa3028
fix: synchronize with typeorm_metadata table only if needed (#9175)
* fix: create typeorm metadata table before migration, if not exists

Creating a view in a migration results in an error: `QueryFailedError:
relation "typeorm_metadata" does not exist` (see #9173). This fix
creates the table before a migration runs.

Closes: #9173

* refactor: use function from RdbmsSchemaBuilder to create typeorm_metadata table

* test: add test for fix issue #9173

* test: replace describe.only() with describe()

* refactor: apply suggestions from review

* refactor: add syncWithMetadata param to createView function

* style: run npm format

* removed only test

* test: add missing syncWithMetaData parameter in create-view.ts

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
2022-09-20 17:27:42 +05:00
Collin
d305e5f9ac
feat: new virtual column decorator (#9339)
* feat: implement new calculated decorator

This new feature change bahviour of typeorm to allow use new calculated decorator

Closes #9323

* feat: implement new virtual decorator

This new feature change bahviour of typeorm to allow use new virtual decorator

Closes typeorm#9323

* feat: Implement new virtual decorator

This new feature change bahviour of typeorm to allow use new virtual decorator

Closes typeorm#9323

* feat: implement new virtual decorator

This new feature change bahviour of typeorm to allow use new calculated decorator

Closes typeorm#9323

* feat: implement new virtual decorator

This new feature change behavior of typeorm to allow use of the new virtual column decorator

Closes typeorm#9323
2022-09-20 17:23:38 +05:00
Umed Khudoiberdiev
8a837f9626 fixed cockroachdb version upgrade issues 2022-09-20 17:03:00 +05:00
Umed Khudoiberdiev
dbc1b2e6f9 version bump 0.3.10 2022-09-19 21:28:59 +05:00
Jannik Mewes
de15df14ed
feat: orphanedRowAction=disabled (rebase of PR 8285) (#8678)
* updated implementation, using "disable" keyword

* rebase test restructure

* rebase orphanedRowAction tests with keyword "disabled"

* rename test suite files to reflect changed naming: skip -> disable
Simplify test suite to comply with postgres12

* Update tests to reflect 0.3 breaking changes

* prettied

Co-authored-by: Jannik <jannik@jannikmewes.de>
2022-09-19 21:22:57 +05:00
Brice Miclo
749809a42a
fix: "Cannot commit, no transaction is active" error in sql.js (#9234)
* fix: fix "Cannot commit, no transaction is active" error in sql.js

Closes: #9100

* Flush database only if transaction is done

Co-authored-by: Brice Miclo <brice.miclo@socomec.com>
2022-09-19 21:15:06 +05:00
Gabriel Kim
83f7b88387
fix: malformed query when selecting deeply nested embedded entities (#9273)
Update `SelectQueryBuilder.buildSelect` method to correctly build the property path for deeply nested embedded entities
2022-09-19 21:14:03 +05:00
Morteza PRK
48976c2967
feat: unify Pool max connection size in supported Drivers (#9305)
Added `poolSize` option everywhere to controll pool option

Closes: #3388

Co-authored-by: mortzprk <mortz.prk@gmail.com>
2022-09-19 21:10:02 +05:00
Jacob Lauritzen
f24b26202b
feat: update db image versions in docker compose (#9367)
* feat: update db image versions in docker compose

closes #9326

* Fix postgres version

* Upgrade Docker compose versions

* Fix docker compose version
2022-09-19 18:07:58 +05:00
Umed Khudoiberdiev
f943e61be9 removed only test 2022-09-19 18:05:30 +05:00
janzipek
a917d657fb
fix: Update RelationIdLoader to use DriverUtils.getAlias (#9380)
Update RelationIdLoader to use DriverUtils.getAlias to prevent aliases being possibly trimmed by database.

Closes: #9379

Co-authored-by: Jan Zípek <jan@zipek.cz>
2022-09-19 18:04:30 +05:00
Hannes Van De Vreken
6bc723bba9
refactor: docblock (#9384) 2022-09-19 18:01:02 +05:00
Regev Brody
a1960e1125
fix: typescript 4.8 type issues #9331 (#9357) 2022-09-15 15:45:07 +05:00
gustavomick
773a4fe439
feat: sqlite - deferrable options for foreign keys (#9360) 2022-09-14 23:10:20 +05:00
Umed Khudoiberdiev
52e5f7c3e2
chore: update LICENSE (#9371) 2022-09-14 22:51:28 +05:00
AlexMesser
cc639610dc
fix: add missing support for primaryKeyConstraintName property in EntitySchema
adds missing support for primaryKeyConstraintName property in EntitySchema definition;
adds tests for another custom constraint names in EntitySchema definition;
2022-08-30 21:44:48 +05:00
Umed Khudoiberdiev
e3aac27031 fix: prototype pollution issue 2022-08-29 23:22:58 +05:00
Umed Khudoiberdiev
ed1f0b95c6 version bump 0.3.9 2022-08-28 23:32:30 +05:00
Umed Khudoiberdiev
6beedfdc89 version bump 2022-08-28 23:29:35 +05:00
rbnayax
03317a3873
fix: bug introduced in CLI (#9332)
* fix: #9330
2022-08-28 23:14:24 +05:00
Taylor Hakes
68e8f22894
feat: add setOnLocked for SKIP LOCKED and NOWAIT (#9317) 2022-08-26 00:24:16 +05:00
Ahmed Osama Ibrahim
340ab67b10
feat: add fake migrations running and reverting (#8976)
* feat: add fake migrations running and reverting

Added a cli option to fake-run or fake-revert a migration, adding to the
executed migrations table, but not actually running it. This feature is
useful for when migrations are added after the fact or for
interoperability between applications which are desired to each keep
a consistent migration history

Closes: #6195

* changed enabled drivers in test

* added docs to the property

* fixed lint issue

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
2022-08-25 20:17:28 +05:00
Ahmed Osama Ibrahim
5e5abbd148
fix: resolve FindOptionsOrder.nulls to allow FIRST/LAST in uppercase (#8978)
* fix: resolve FindOptionsOrder.nulls issue to accept FIRST/LAST in uppercase

Closes #8970

* fixed failing test

Co-authored-by: Alex Messer <dmzt08@gmail.com>
2022-08-25 19:50:11 +05:00
Stefan Aebischer
72728f155d
fix: allow where IsNull for ManyToOne relations (#9031)
* fix: allow where IsNull for ManyToOne relations

Closes: #8890

* fix direct FindOperator queries on MTO relation

* fix: allow FindOperator queries on OTO owner column

* chore: prettier formating
2022-08-25 19:07:06 +05:00
Joren Vandeweyer
88d0ced812
fix: QueryBuilder update handles Date objects wrong on a ManyToOne relationship (#8748)
* fixes #8747

* apply fix again

* added test for issue 8747

* format

* remove .only

* only use postgres driver

* fixed test

* removed createDateColumn

* sqlite does not support timestamp type

* fix typo

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
Co-authored-by: Alex Messer <dmzt08@gmail.com>
2022-08-25 19:01:40 +05:00
Philip Thrasher
b8d04dc3f9
fix: sqlite temporary tables now honor withoutRowid (#8431)
* fix: sqlite temporary tables now honor withoutRowid

Closes: #8430

* merge master

* fixed `withoutRowid` on table recreation;
added test;

Co-authored-by: Thrasher <thrasher@grayshift.com>
Co-authored-by: Alex Messer <dmzt08@gmail.com>
2022-08-25 18:29:16 +05:00
John
c4f46506d8
fix: change postgres driver version checking query (#9319)
* fix #9318

fix: change postgres driver version checking query

Change the postgres `SHOW server_version` query to use `SELECT version()` which adds compatibility with AWS Redshift database

Closes: #9318

* git-issue 9318: remove describe from only in test

* fix-9318: prettier format test
2022-08-25 17:40:12 +05:00
Kevin KONRAD
36718876f9
fix: handle inherited relations insert order (#9321)
Fix forgot comparison operator in #9242

Closes: #9241

Co-authored-by: Kevin KONRAD <ext.kevin.konrad@reseau.sncf.fr>
2022-08-25 17:35:16 +05:00
Umed Khudoiberdiev
7198a7a732
Revert "feat: add array parameter on groupBy (#9243)" (#9320)
This reverts commit 77866d85d20991930f55000cd5d4e340c68930b4.
2022-08-24 22:49:15 +05:00
Frank Chan
dadb658c59
feat: add support for non-generated columns with uuid_generate_v4() default (#9065)
* fix: support postgres column with varchar datatype and uuid_generate_v4() default

Closes: #9063

* added test

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
2022-08-24 22:02:21 +05:00
Bryan Fox
eb8f0c6c04
fix: pass error to pgpool release (#9209)
This extends github PR #7792 to pass the error, if any, to the release
callback from `pg-pool`. This should be done to ensure the connection is
removed from the pool, as described in #5112.
2022-08-24 21:59:13 +05:00
BitDesert
51a0ebe5f2
feat: new mssql option appName (#9213) 2022-08-24 21:56:51 +05:00