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
* 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
* 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
### `@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`
* 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>
* 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
* 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>
* 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>
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>
adds missing support for primaryKeyConstraintName property in EntitySchema definition;
adds tests for another custom constraint names in EntitySchema definition;
* 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>
* fix: resolve FindOptionsOrder.nulls issue to accept FIRST/LAST in uppercase
Closes#8970
* fixed failing test
Co-authored-by: Alex Messer <dmzt08@gmail.com>
* 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
* 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>
* 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
* fix: support postgres column with varchar datatype and uuid_generate_v4() default
Closes: #9063
* added test
Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>
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.