Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Create correct children during cascade saving entities with STI #9034

Merged

Conversation

felix-gohla
Copy link
Contributor

@felix-gohla felix-gohla commented May 24, 2022

Description of change

This PR fixes an issue when saving entities from a Single Table Inheritance schema linked to another entity (e.g. one entity, many STI-children). The wrong class was created (wrong discriminator saved to the DB).

Take the example from the issue, then when saving Animals (explicitly: Dogs and Cats inheriting from Animal) connected to a Person, only Animals were created.

Now, the create function also checks whether the expected value is an entity of a class of a child entity and creates the correct class.

Fixes #7558
Fixes #9033

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run format to apply prettier formatting
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions explained in CONTRIBUTING.md

@felix-gohla felix-gohla changed the title Fix/7558 sti children wrong discriminator fix: Create correct children during cascade saving entities with STI May 24, 2022
@felix-gohla felix-gohla force-pushed the fix/7558-sti-children-wrong-discriminator branch from 508bf7a to 2e53d6f Compare May 24, 2022 10:24
@felix-gohla
Copy link
Contributor Author

@OoDeLally, @francescosalvi and @agwermann, could you please have a look at whether this fixes the problem? 😊

@francescosalvi
Copy link
Contributor

francescosalvi commented May 24, 2022

@felix-gohla unfortunately I couldn't manage to get your repo/branch to build locally, anyway by looking at the unit test, if I am not mistaken I don't see the test case that I would expect, which would be:

  • create parent class (e.g. Animal) by setting discriminant column value explicitly (type:="dog")
  • save above entity
  • load it back (using the Animal repository)
  • assert loaded entity is of Dog sub-type (instanceof)
  • assert discriminant column (type)'s value matches the original one ("dog"), instead of the current class name (which currently would equal to "animal").

@felix-gohla
Copy link
Contributor Author

@francescosalvi Thanks for your quick response and for having a look at the code.

I am not sure, however, how the test you describe is related to the issue mentioned in #7558. Do you maybe mean #9033 or do you think that those two are the same thing?

@francescosalvi
Copy link
Contributor

@felix-gohla I don't think I knew about #9033 actually... but yeah it looks like #7558 is just a "more complex" case for what is also described in #9033. In any case the final effect is the same. I mean it should be simple to add the case I described and see if it got fixed by your PR, in such case we can safely infer root cause is the same.

@felix-gohla felix-gohla force-pushed the fix/7558-sti-children-wrong-discriminator branch 2 times, most recently from e5ca8c3 to 131fa64 Compare May 27, 2022 07:17
@felix-gohla
Copy link
Contributor Author

@francescosalvi Ok, I added a corresponding fix / feature for what is described in #9033. However, I think, the issue is a different one from #7558. In the latter one, @OoDeLally describes that when saving a Person with pets, despite having used the concrete classes for Dog and Cat, only Animal is stored.

In #9033, I think, the opposite is the use case: @AlfaHound wants to use the base class and set the discriminator manually to create a concrete instance. This is not what #7558 is trying to achieve.
You can also see this because the originally described example from @OoDeLally works without the new changes.

@felix-gohla felix-gohla force-pushed the fix/7558-sti-children-wrong-discriminator branch 3 times, most recently from a880b59 to b7706a1 Compare May 27, 2022 08:01
@francescosalvi
Copy link
Contributor

@felix-gohla thanks for also addressing #9033!

@felix-gohla felix-gohla force-pushed the fix/7558-sti-children-wrong-discriminator branch from d2d61bb to b006420 Compare August 22, 2022 13:45
@pleerock
Copy link
Member

This one is hard to review. I need people who use STI, can test these changes and approve this PR.

@felix-gohla
Copy link
Contributor Author

Hi @pleerock, thanks for looking into this! Is there anything I can do to make it easier? 🤔 😊

@pleerock
Copy link
Member

Hi @pleerock, thanks for looking into this! Is there anything I can do to make it easier? 🤔 😊

Ask other cleaver enough people to review and test your changes and be patient on this PR ☯️

@felix-gohla felix-gohla force-pushed the fix/7558-sti-children-wrong-discriminator branch from 1ded622 to c0be7ab Compare October 2, 2022 16:31
@felix-gohla felix-gohla force-pushed the fix/7558-sti-children-wrong-discriminator branch 2 times, most recently from 7a167c9 to 61cfa43 Compare November 7, 2022 10:53
@AlexMesser
Copy link
Collaborator

@felix-gohla can you merge the latest master changes to your branch? Hope it will fix CI issue.

@pleerock
Copy link
Member

pleerock commented Dec 3, 2022

the error CI gives is weird and appear only on some users... maybe users miss some permissions to CircleCI, not sure why this happens...

@felix-gohla felix-gohla force-pushed the fix/7558-sti-children-wrong-discriminator branch from 61cfa43 to 4fe3787 Compare December 3, 2022 16:00
@AlexMesser
Copy link
Collaborator

@felix-gohla I am trying to re-trigger CircleCI Pipeline by pushing a small change, but getting remote: Permission to giz-berlin/typeorm-1.git denied to AlexMesser. Can you please review permissions and allow me to push.

@felix-gohla
Copy link
Contributor Author

Sorry, I cannot provide you with push-access. Could you add the changes here in the PR? I would then apply them.

@pleerock
Copy link
Member

pleerock commented Feb 9, 2023

@felix-gohla the problem is that for some reason CircleCI didn't run the tests for the commit you did. So @AlexMesser wanted to push something to your branch in order to trigger CircleCI to run your tests.

Have no idea why CircleCI behaves this way, e.g. doesn't run the tests for you.

@felix-gohla
Copy link
Contributor Author

felix-gohla commented Feb 9, 2023

I understand that he wanted to push something in order to trigger the tests.
However, I cannot provide him with push access (as I cannot set the access rights myself!).

If it's the changes that should fix something, I am happy to apply them if he pastes them here in the MR as text.
If it's just another push to re-trigger the pipeline, I can also just force push or what has to be done for you to be able to re-trigger the CI?
If you think that the problem is that @AlexMesser did not push but I did, then I will try my best to give him push access when my superior is back from vacation. :D

@felix-gohla felix-gohla force-pushed the fix/7558-sti-children-wrong-discriminator branch from 4fe3787 to a5f9694 Compare February 9, 2023 16:48
@felix-gohla felix-gohla force-pushed the fix/7558-sti-children-wrong-discriminator branch from a5f9694 to 4adb1d9 Compare February 16, 2023 20:11
@felix-gohla
Copy link
Contributor Author

felix-gohla commented Feb 16, 2023

My suspicion is that our repo was called typeorm-1 instead of typeorm. Could this be the problem? I renamed the repo. Maybe you could re-trigger the pipeline? 😊

Edit: I also invited @AlexMesser now as maintainer. If you need admin access, hit me up.

Edit edit: I granted CircleCI access to the organization and it seems to work now. Not sure if the name was really the problem. I fixed the formatting of the files.

@felix-gohla felix-gohla force-pushed the fix/7558-sti-children-wrong-discriminator branch from 831f1ee to 2e3e4bd Compare May 1, 2023 13:20
@felix-gohla
Copy link
Contributor Author

I fixed the tests. 😊

@pleerock
Copy link
Member

pleerock commented May 9, 2023

@felix-gohla I'll merge this PR, but please watch for the issues on STI - it case if it will break something - we need to react. This area is a bit complicated, that's why I can never be 100% sure that all changes are absolutely valid. Thank you.

@pleerock pleerock merged commit 06c1e98 into typeorm:master May 9, 2023
7 checks passed
@pleerock
Copy link
Member

pleerock commented May 9, 2023

@felix-gohla tests on master currently fail after I merged it. Can you please take a look? It looks like there are some recent changes (#9786 ?) that conflicted with what you had in your test

@felix-gohla
Copy link
Contributor Author

I'll have a look at it. 😊

felix-gohla added a commit to giz-berlin/typeorm that referenced this pull request May 10, 2023
Oracle does not have a `onUpdate: 'CASCADE'` option.
Thus, the test fixtures had to be adapted.
Checking for the correct `onUpdate` actions for Oracle was introduced in typeorm#9786.
@felix-gohla
Copy link
Contributor Author

See #10037

pleerock pushed a commit that referenced this pull request May 10, 2023
Oracle does not have a `onUpdate: 'CASCADE'` option.
Thus, the test fixtures had to be adapted.
Checking for the correct `onUpdate` actions for Oracle was introduced in #9786.
Vylpes added a commit to Vylpes/vylbot-app that referenced this pull request Jun 12, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [typeorm](https://typeorm.io) ([source](https://github.com/typeorm/typeorm)) | dependencies | patch | [`0.3.14` -> `0.3.16`](https://renovatebot.com/diffs/npm/typeorm/0.3.14/0.3.16) |

---

### Release Notes

<details>
<summary>typeorm/typeorm</summary>

### [`v0.3.16`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#&#8203;0316-httpsgithubcomtypeormtypeormcompare03150316-2023-05-09)

[Compare Source](typeorm/typeorm@0.3.15...0.3.16)

##### Bug Fixes

-   add `trustServerCertificate` option to `SqlServerConnectionOptions` ([#&#8203;9985](typeorm/typeorm#9985)) ([0305805](typeorm/typeorm@0305805)), closes [#&#8203;8093](typeorm/typeorm#8093)
-   add directConnection options to MongoDB connection ([#&#8203;9955](typeorm/typeorm#9955)) ([e0165e7](typeorm/typeorm@e0165e7))
-   add onDelete option validation for oracle ([#&#8203;9786](typeorm/typeorm#9786)) ([938f94b](typeorm/typeorm@938f94b)), closes [#&#8203;9189](typeorm/typeorm#9189)
-   added instanceName to options ([#&#8203;9968](typeorm/typeorm#9968)) ([7c5627f](typeorm/typeorm@7c5627f))
-   added transaction retry logic in cockroachdb ([#&#8203;10032](typeorm/typeorm#10032)) ([607d6f9](typeorm/typeorm@607d6f9))
-   allow json as alias for longtext mariadb ([#&#8203;10018](typeorm/typeorm#10018)) ([2a2bb4b](typeorm/typeorm@2a2bb4b))
-   convert the join table ID to the referenceColumn ID type ([#&#8203;9887](typeorm/typeorm#9887)) ([9460296](typeorm/typeorm@9460296))
-   correct encode mongodb auth credentials ([#&#8203;10024](typeorm/typeorm#10024)) ([96b7ee4](typeorm/typeorm@96b7ee4)), closes [#&#8203;9885](typeorm/typeorm#9885)
-   create correct children during cascade saving entities with STI ([#&#8203;9034](typeorm/typeorm#9034)) ([06c1e98](typeorm/typeorm@06c1e98)), closes [#&#8203;7758](typeorm/typeorm#7758) [#&#8203;7758](typeorm/typeorm#7758) [#&#8203;9033](typeorm/typeorm#9033) [#&#8203;9033](typeorm/typeorm#9033) [#&#8203;7758](typeorm/typeorm#7758) [#&#8203;7758](typeorm/typeorm#7758)
-   express option bug in init command ([#&#8203;10022](typeorm/typeorm#10022)) ([5be20e2](typeorm/typeorm@5be20e2))
-   for running cli-ts-node-esm use exit code from child process ([#&#8203;10030](typeorm/typeorm#10030)) ([a188b1d](typeorm/typeorm@a188b1d)), closes [#&#8203;10029](typeorm/typeorm#10029)
-   mongodb typings breaks the browser version ([#&#8203;9962](typeorm/typeorm#9962)) ([99bef49](typeorm/typeorm@99bef49)), closes [#&#8203;9959](typeorm/typeorm#9959)
-   RelationIdLoader has access to queryPlanner when wrapped in transaction ([#&#8203;9990](typeorm/typeorm#9990)) ([21a9d67](typeorm/typeorm@21a9d67)), closes [#&#8203;9988](typeorm/typeorm#9988)
-   resolve duplicate subscriber updated columns ([#&#8203;9958](typeorm/typeorm#9958)) ([3d67901](typeorm/typeorm@3d67901)), closes [#&#8203;9948](typeorm/typeorm#9948)
-   select + addOrderBy broke in 0.3.14 ([#&#8203;9961](typeorm/typeorm#9961)) ([0e56f0f](typeorm/typeorm@0e56f0f)), closes [#&#8203;9960](typeorm/typeorm#9960)
-   support More/LessThanOrEqual in relations  ([#&#8203;9978](typeorm/typeorm#9978)) ([8795c86](typeorm/typeorm@8795c86))

##### Features

-   mariadb uuid inet4 inet6 column data type support ([#&#8203;9845](typeorm/typeorm#9845)) ([d8a2e37](typeorm/typeorm@d8a2e37))

##### Reverts

-   "refactor: remove date-fns package ([#&#8203;9634](typeorm/typeorm#9634))" ([54f4f89](typeorm/typeorm@54f4f89))

### [`v0.3.15`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#&#8203;0315-httpsgithubcomtypeormtypeormcompare03140315-2023-04-15)

[Compare Source](typeorm/typeorm@0.3.14...0.3.15)

##### Bug Fixes

-   make cache optional fields optional ([#&#8203;9942](typeorm/typeorm#9942)) ([159c60a](typeorm/typeorm@159c60a))
-   prevent unique index identical to primary key (all sql dialects) ([#&#8203;9940](typeorm/typeorm#9940)) ([51eecc2](typeorm/typeorm@51eecc2))
-   SelectQueryBuilder builds incorrectly escaped alias in Oracle when used on entity with composite key ([#&#8203;9668](typeorm/typeorm#9668)) ([83c6c0e](typeorm/typeorm@83c6c0e))

##### Features

-   support for the latest mongodb v5 ([#&#8203;9925](typeorm/typeorm#9925)) ([f6a3ce7](typeorm/typeorm@f6a3ce7)), closes [#&#8203;7907](typeorm/typeorm#7907) [#&#8203;7907](typeorm/typeorm#7907)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC43NC4yIiwidXBkYXRlZEluVmVyIjoiMzQuNzQuMiJ9-->

Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/237
Co-authored-by: RenovateBot <renovate@vylpes.com>
Co-committed-by: RenovateBot <renovate@vylpes.com>
javierdelafuentesales added a commit to streamyard/typeorm that referenced this pull request Jun 30, 2023
* feat: added opaque types support over primitives in find-options (typeorm#9560)

* added opaque types support over primitives in find-options
* removed lock-verify because of its deprecation
* fixing auto type mapping

* docs: improve zh docs (typeorm#9575)

* docs: general grammer (typeorm#9574)

* Github issue templates converted to forms (typeorm#9434)

* Update and rename bug-report.md to bug-report.yml

* Update and rename documentation-issue.md to documentation-issue.yml

* Update and rename feature-request.md to feature-request.yml

* checkboxes

* Update feature-request.yml

* Update feature-request.yml

Co-authored-by: AlexMesser <dmzt08@gmail.com>

* feat: allow peerDependency of better-sqlite3 version 8.x.x (typeorm#9564)

closes typeorm#9563

* docs: removed unnecessary slash in comments (typeorm#9533)

* fix: pass fake flag to undoLastMigration (typeorm#9562)

Closes: typeorm#9561

* build(deps): bump decode-uri-component from 0.2.0 to 0.2.2 (typeorm#9590)

Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](SamVerschueren/decode-uri-component@v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  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>

* fix: correctly return insertId for react-native (typeorm#9554)

* fix: the mpath is incorrect when the parent of the tree entity is null (typeorm#9535)

* fix: the mpath is incorrect when the parent of the tree entity is null

* lint: code format

* fix: findTrees not have children

* test: add unit test

* style: format code

* fix: unit test

* fix: unit test

* fix: unit test

* docs: add in an example for 4526 (typeorm#9538)

* docs: add in an example for 4526

* small fixes

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>

* feat: "And" operator in FindOptions (typeorm#9489)

Closes typeorm#3113

* fix: left instead of inner join for where or + optional relations (typeorm#9516)

* fix: typings for Repository.extend function (typeorm#9396)

additionally remove duplicated TreeRepository.extend method

* feat: index support for materialized views of PostgreSQL (typeorm#9414)

* feat: Added new indices attribute to View

* feat: Added view indices methods

Such as dropViewIndex, addViewIndices, addViewIndex

Added "View" type in some parameters of methods

* feat: Added view indices support when creating new indices and dropping old indices

* ref: Renamed "table" to "view" in log when dropping view index

* feat: changed order of schema sync operations

To create a new view index, a view has to be created first.

* feat: removed unreachable code

A view object don't have its indices when creation. The indices are added to the view through the createViewIndex method.

* feat: Added view when returning TableIndex

* feat: Added view paths as argument in getViews on log method

* feat: Created createViewIndexSql

This method reuses code from createIndexSql, but eliminates the isSpatial part, because a viewColumn doesn't support this attribute.

* fix: Added missing columns const to createViewIndexSql

* feat: Removed isSpatial attribute when returning TableIndex

* feat: Added unit tests

* fix: Dropped current index to leave unique index on indices array

There was a bug that when asserting the unique index, it would compare with the previous index, even when explicitly selecting the unique index in the indices array.

* ref: lint files

* feat: added "postgres" in enabledDrivers attribute

This is to enable only PostgreSQL for the tests

* feat: added doc for materialized view indices

* ref: lint files

* feat: Added new method to create mat. view indices

This new method goes after creating the views. Aditionally, the views are now created at the end (as it was before)

* ref: prettify files

* feat: revamped tests

Replaced previous unit tests with more significant ones

* docs: Improve comprehension of update repository API (typeorm#9417)

* Improve comprehension of update repository API

Because the previous doc example was `await repository.update({ firstName: "Timber" }, { firstName: "Rizzrak" })`, I got confused and reversed the **WHERE** condition and the actual **change**.

This change is just a suggestion to avoid that kind of confusion

* Apply the same doc suggestion change to the entity manager update API

* feat: upsert options conflictPaths as Entity keys (typeorm#9365)

* feature: upsert options conflictPaths as Entity keys

* feature: upsert options conflictPaths as object

* feature: upsert options conflictPaths as object

Co-authored-by: Pavel <pavel@loanbase.com>

* docs: update "migrate:show error code" description (typeorm#9476)

* feat: add id in migrate:show command logging (typeorm#9475)

* feat: add Open DB Flags and URI DB Name in SQLite (typeorm#9468)

* Add the open database flags for sqlite3.

* Check for URI before trying to create the DB dir.

* Spacing.

* Add the sqlite open connection flags.

* Spacing.

Co-authored-by: Adrian Burlacu <adrian.burlacu@live.com>

* fix: assign isInitialized: true at the end of .initialize() method (typeorm#9455)

* fix: cacheId not used when loading relations with take (typeorm#9469)

* fix: cacheId not used loading relations

The cacheId is set to undefined for the main request used for pagination when we load related entities

* fix: tests

* feat: add parseInt8 option to postgres driver. Closes typeorm#9341 (typeorm#9435)

* feat: add parseInt8 option to postgres driver

* chore: formatting

* Revert "fix: assign isInitialized: true at the end of .initialize() method (typeorm#9455)" (typeorm#9591)

This reverts commit 81fc9a9.

* fix: fixed outdated `init` command (typeorm#9422)

* fix: Updating the samples current version of typeorm.

The cli sample was using the getRepository version in the UserController and in the current versions of the typeorm it was deprecated.
Basically I changed the code to the current version using AppDataSource.

* fix: improving code and fixing bugs

I made several changes to the functions because they had bugs, such as the id being a "string" instead of a "number",
the "userRepository" methods being outdated and checking the code to see if the user exists before doing some executions

* feat: migration:generate successful exit the process with zero code (typeorm#9288)

* fix: disable transactionSupport option for CordovaDriver (typeorm#9391)

* fix: disable transaction support for cordova driver

the cordova-sqlite-storage plugin does not support transactions. fc4133c
introduced an exception when starting a transactions but did not disable
the transactionSupport in general leading to errors when using the
`save` and `remove` method of the `EntityPersistExecutor`. With this PR
the `EntityPersistExecutor` will respect the drivers `transactionSupport`
option.

* docs: add note on transaction limitations for cordova driver

* feat: implement exists query method (typeorm#9303)

Adding `Exists` method to query builder and EntityManager, to check whether a row exists given the conditions

Closes: typeorm#2815

Co-authored-by: mortzprk <mortz.prk@gmail.com>

* feat: Add synchronize to @jointable (typeorm#9442)

* feat: Add synchronize option to @jointable

Add synchronize option to @jointable. It allows to ignore JoinTable when syncing and generating migrations.

Closes typeorm#3443

* removed only

* lint fix

Co-authored-by: Bartlomiej Rutkowski <brutkowski@tilt.app>
Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
Co-authored-by: Alex Messer <dmzt08@gmail.com>

* lint fix

* feat: allow for partial index conditions for on conflict statments in postgres (typeorm#8971)

* feat: allow for partial index conditions for on conflict statments in postgres

* fix: change variable to match postgres documentation and convert from array to string type

* fix: generalize use of index predicate. add documentation and expand test cases

* lint fix

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
Co-authored-by: Alex Messer <dmzt08@gmail.com>

* fixed latest typescript-related issue

* feat: allow per-migration control over transaction behavior (typeorm#9459)

Closes typeorm#7087

* fix : primary constraint name undefined error (typeorm#9576)

* fix : primary constraint name undefined erorr for PostgresQueryRunner.ts

* Update src/driver/postgres/PostgresQueryRunner.ts

Co-authored-by: leo-jnesis <55386067+leo-jnesis@users.noreply.github.com>

Co-authored-by: AlexMesser <dmzt08@gmail.com>
Co-authored-by: leo-jnesis <55386067+leo-jnesis@users.noreply.github.com>

* version bump

* docs: fix missing ) (typeorm#9629)

* fix: DataSource.setOptions doesn't properly update the database in the drivers (typeorm#9635)

* make sure we update database in the driver if it was dynamically set (via dataSource.setOptions)

* removed validation for database since we definitely shouldn't have it in the constructor, database can be set later on (e.g. datasource.setOptions)

* fix: multiple select queries during db sync in sqlite (typeorm#9639)

* fixed multiple select queries during db sync in sqlite

* docs: correct typo (typeorm#9655)

* docs: correct a typo (typeorm#9651)

* docs: correct typo (typeorm#9643)

* Create SECURITY.md

* fix: allow to pass ObjectLiteral in mongo find where condition (typeorm#9632)

Closes: typeorm#9518

* feat: support busy_timeout param parameter for sqlite (typeorm#9623)

Co-authored-by: sinkhaha <1468709606@qq.com>

* fix: materialized hints support for cte (typeorm#9605)

Fix implementation of materialized hints in common table expressions
Previous behavior did not account for NOT MATERIALIZED hints, also
placed materialized hints in wrong place (before "AS")

Co-authored-by: Adrian Parry <adrian.parry@reign.cl>

* fix: synchronizing View with schema broken for oracle (typeorm#9602)

* fix view+schema broken for oracle

* apply prettier

* fixed missing schema in loadViews();
added test (with .only)

* removed .only

Co-authored-by: James Jurach <James.Jurach@apiture.com>
Co-authored-by: Alex Messer <dmzt08@gmail.com>

* removed titles from issue templates

* docs: fix some typo in migration document (typeorm#9667)

* feat: support time travel queries, upsert, enums, spatial types in cockroachdb (typeorm#9128)

* feature: adds support for enum type (fixes typeorm#9068)

* temporarily ran package to test on different repo

* playing around - bumped version

* Revert "playing around - bumped version"

This reverts commit 7df4adb.

* Revert "temporarily ran package to test on different repo"

This reverts commit 48f394e.

* feat: add support for geometry data type

* feature: properly hydrate enum array values

* feature: adds support for geography and geometry for cockroachdb

* bugfix: fixes issue with primary generated columns being invalid column type (fixes typeorm#8532)

* Revert "bugfix: fixes issue with primary generated columns being invalid column type (fixes typeorm#8532)"

This reverts commit e00cdb0.

* bugfix: type casts to string when using ANY

* feature: cast geometry/geography to geojson

* feature: added references to srid

* bugfix: prevent error if trying to close already closed connection

* feature: added cockrachodb as part of postgres family

* feature: ensures support for spatial columns for cockroachdb

* feature: adds support for UPSERT for CockroachDB (fixes typeorm#9199)

* minor: added TODO; unsure how to achieve this

* feature: adds support for time travelling queries for cockroachdb

* bugfix: only run time travel query on SELECT statements

* refactor: changed UsertType from 'upsert' to 'primary-key' since this is more logical

* feature: added posibility to set timeTravelQuery to false, instead of the parameter function; help for disabling time travel queries during tests

* feature: allow timeTravelQueries in find* queries

* bugfix: when using timetravel queries with joinAttributes it now prevents error 'AS OF SYSTEM TIME must be in top level' error

* lint

* minor fix

* fixed failing test

* implemented ENUM type;
added tests;

* fixed failing tests

* fixed failing test

* fixed spatial types synchronization;
implemented spatial indices;
added tests for spatial columns;

* refactored Time Travel Query functionality;
removed TTQ from find options;
added tests for TTQ;

* added docs for Time Travel Queries

* minor changes

* added GeoJSON types;
other minor fixes;

* updated docs

* updated docs

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>

* refactor: remove a deprecated function (typeorm#9702)

* fix: remove unnecessary .js extension in imports (typeorm#9713)

* fix: remove extension when importing file

* removed unnecessary .js extension in imports

---------

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>

* chore: add *.iml to .gitignore (typeorm#9707)

* test: Add test to prove that issue typeorm#2331 is resolved (typeorm#9688)

* test: update multiple nested embedded entities (typeorm#9696)

* test: update multiple nested embedded entities

Closes: typeorm#1200

* test: update multiple nested embedded entities - fix for ORA-00972 - shorter names

Closes: typeorm#1200

* test: correct test name for issue 1200

Closes: typeorm#1200

* fix: overriding caching settings when alwaysEnabled is true (typeorm#9731)

* 9023-2 Fix cache overriding option

* 9023-2 Fix format

* docs: update many-to-many-relations.md (typeorm#9736)

* build(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 (typeorm#9758)

Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](kornelski/http-cache-semantics@v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: Fix grammar error in no migrations found log (typeorm#9754)

* docs: Fix grammar error in the first paragraph. (typeorm#9759)

docs: Fix grammar (verbal agreement) error in the first paragraph.

* feat: allow mysql2 v3 as peerDependency (typeorm#9747)

Closes typeorm#9714

* fix: make sure "require" is defined in the environment

* fix: redundant Unique constraint on primary join column in Postgres (typeorm#9677)

* test: one migration for PrimaryColumn and JoinColumn in pg

* fix: stop postgres from creating unique on PrimaryColumn with JoinColumn

* fix: resolve issue with "simple-enum" synchronization in SQLite (typeorm#9716)

* fix: resolve issue with "simple-enum" in sqlite

Closes: typeorm#9715

* trying to re-trigger CircleCI tests

---------

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>

* fix: improved `FindOptionsWhere` behavior with union types (typeorm#9607)

* test: add test that where condition can accepts LessThan with Union

* fix: allow FindOptionsWhere to accept LessThan with Union

* added comment and simplified the type

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>

* fix: sql expression when `where` parameter is empty array (typeorm#9691)

Closes: typeorm#9690

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>

* feat: naming strategy for legacy Oracle (typeorm#9703)

* feat: naming strategy for legacy Oracle

This feature is LegacyOracleNamingStrategy which can be used to handle Oracle error ORA-00972.

* feat: naming strategy for legacy Oracle

This feature is LegacyOracleNamingStrategy which can be used to handle Oracle error ORA-00972.

* feat: add find operator json contains (typeorm#9665)

* feature: add find operator json contains

* add test

---------

Co-authored-by: Игорь Сары <isary@MacBook-Pro-Igor.local>
Co-authored-by: dzvyagin <dzvyagin@team.amocrm.com>

* docs: update cli related docs (typeorm#9659)

- remove cli.entitiesDir description
- remove cli.subscribersDir description
- remove cli from Data Source Options example
- extend migration:run examples with -- -d path-to-datasource-config
- extend migration:revert examples with -- -d path-to-datasource-config
- extend migration:show examples with -- -d path-to-datasource-config
- extend migration:create examples with path-to-migrations-dir/migrationName

Co-authored-by: Stefan <stefi@sprintingsoftware.com>

* feat: support enableWal for the better-sqlite3 driver (typeorm#9619)

* fixed wrong callback definition in tests

* fix: Incorrect enum default value when table name contains dash character (typeorm#9685)

* fix: get enum default value

* chore: format

* fix: add support for mongodb v4 (typeorm#9450)

* fix: add support for mongodb driver v4

This new fix allow support to mongodb driver v4

Closes: typeorm#7907

* fix: add support for mongodb driver v4
This new fix allow support to mongodb driver v4

Closes: typeorm#7907

---------

Co-authored-by: Matheus Melo Antiquera <matheusantiquera@finchsolucoes.com.br>

* Revert "fix: add support for mongodb v4 (typeorm#9450)" (typeorm#9762)

This reverts commit 8150525.

* fix: incorrect sorting of entities with multi-inheritances (typeorm#9406)

* Fixed sorting of entities with multi-inheritances

* prettier

* added test case

---------

Co-authored-by: Alex Messer <dmzt08@gmail.com>

* removed unnecessary .js extension in imports

* refactor: use abstract logger to reduce duplicate code (typeorm#9751)

* feat(platform-tools): add more logging functions

* refactor(logger): add `AbstractLogger` to reduce duplicate code

---------

Co-authored-by: Christian Forgács <christian@wunderbit.de>

* feat: update mssql dependency and other dependencies as well (typeorm#9763)

* updating dependencies

* fixing circleci config

* reverting mongodb version back

* increasing cli commands test timeout

* feat: support for SQL aggregate functions SUM, AVG, MIN, and MAX to the Repository API (typeorm#9737)

* feat: Add support for SQL aggregate functions SUM, AVG, MIN, and MAX to the Repository API

* rename field name to make tests work in oracle

* fix the comments

* update the docs

* escape column name

* address PR comment

* format the code

* version bump

* fix: react-native doesn't properly work in ESM projects because of circular dependency (typeorm#9765)

* fix: use forward slashes when normalizing path (typeorm#9768)

Fixes typeorm#9766

* docs: documented getCount() method (typeorm#9847)

* documented getCount()

getCount() is currently only mentioned in the documentation once, and you're never shown how to use it. This patch adds a little documentation for getCount()

* clarification

* docs: update relations-faq (typeorm#9879)

Proposed a better safe-type workaround for circular dependencies.

* docs: update many-to-many-relations.md (typeorm#9861)

Fixing typescript code.

* docs: added a documentation section on debugging query builder (typeorm#9846)

* Added a section on debugging query builder

It covers using getQuery() and getQueryAndParameters() which are both useful when trying to figure out why your query isn't doing what you might expect it should do.

* forgot await

* fix typo

* refactor: remove date-fns package (typeorm#9634)

* refactor: remove date-fns

Since TypeORM only uses one function from the date-fns library
it is unnecessary to install this large package.

* refactor: add DateUtils.parseDateAsISO

* refactor: reintroduced comment

* build(deps): bump jsonwebtoken and mssql (typeorm#9700)

Bumps [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) to 9.0.0 and updates ancestor dependency [mssql](https://github.com/tediousjs/node-mssql). These dependencies need to be updated together.


Updates `jsonwebtoken` from 8.5.1 to 9.0.0
- [Release notes](https://github.com/auth0/node-jsonwebtoken/releases)
- [Changelog](https://github.com/auth0/node-jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](auth0/node-jsonwebtoken@v8.5.1...v9.0.0)

Updates `mssql` from 7.3.0 to 9.0.1
- [Release notes](https://github.com/tediousjs/node-mssql/releases)
- [Changelog](https://github.com/tediousjs/node-mssql/blob/master/CHANGELOG.txt)
- [Commits](tediousjs/node-mssql@v7.3.0...v9.0.1)

---
updated-dependencies:
- dependency-name: jsonwebtoken
  dependency-type: indirect
- dependency-name: mssql
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: resolve issues for mssql migration when simple-enum was changed

* fix: resolve issues for mssql migration when simple-enum was changed

- Changes are now detected
- Incorrect update Statement was split into a DROP CONSTRAINT and ADD CONSTRAINT Statement

Closes: typeorm#7785 typeorm#9457

* fix: resolve issues for mssql migration when simple-enum was changed

- Changes are now detected
- Incorrect update Statement was split into a DROP CONSTRAINT and ADD CONSTRAINT Statement

Closes: typeorm#7785 typeorm#9457

* code refactoring;
changed `enumName` usage to generated name;
improvements in test;

---------

Co-authored-by: ke <ke@sbs.co.at>
Co-authored-by: Alex Messer <dmzt08@gmail.com>

* fix: resolves issue with mssql column recreation (typeorm#9773)

* fix: resolves issue with mssql column recreation when length max is in lower case

Closes: typeorm#9399

* removed redundant question mark

---------

Co-authored-by: ke <ke@sbs.co.at>

* feat: allow type FindOptionsOrderValue for order by object property (typeorm#9895) (typeorm#9896)

When using an Entity column transformer for an object type, the underlying database column may be
sortable, despite the static TypeScript type being an object. The `FindOptionsOrder` typing
should allow sorting on that object property and not require further nesting.

Fixes issue typeorm#9895.

* fixing failing test

* feat: Broadcast identifier for removed related entities  (typeorm#9913)

* Initial commit

* Pending changes exported from your codespace

* Revert changes

* Fix format

* test: when calling AVG on an integer column, MS SQL Server returns an int. (typeorm#9784)

In this case, 50 instead of 50.5. Apparently the ANSI standard for SQL
is silent on this issue, so either behavior should be considered
acceptable.

* fix: loading tables with fk in sqlite query runner (typeorm#9875)

Closes: typeorm#9266

* fix: improve EntityNotFound error message in QueryBuilder.findOneOrFail (typeorm#9872)

* fix: EntityNotFound error message in QueryBuilder.findOneOrFail

* change test

* change test

* change test

* fix: proper default value on generating migration when default value is a function calling [Postgres] (typeorm#9830)

Co-authored-by: Dmytro Boiko <dmitriy.b@tracktica.com>

* docs: update migrations docs (typeorm#9828)

* feat: add support for STI on EntitySchema (typeorm#9834)

* feat: add support for STI on EntitySchema

Closes: typeorm#9833

* fix: run prettier

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>

* fix: use object create if entity skip constructor is set (typeorm#9831)

* feat: add support for json datatype for sqlite (typeorm#9744)

* fix: prevent foreign key support during migration batch under sqlite (typeorm#9775)

* fix: prevent foreign keys support during migration batch under sqlite

Schema changes in migrations batch cannot be done on table which has referring
 foreign keys with ON DELETE CASCADE without deleting its content.

Closes: typeorm#9770

* Update MigrationExecutor.ts

* Update command.ts

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>

* fix: transform values for FindOperators typeorm#9381 (typeorm#9777)

* fix: transform values for FindOperators

Closes: typeorm#9381

* refactor: simplify correction

do not transform value, when it is a FindOperator

Closes: typeorm#9381

* fix: transform value of FindOperator when it is not a FindOperator

Closes: typeorm#9381 typeorm#9816

* fix: perform transformation on the array instead of each value in case of JsonContains

* fix: remove anti pattern, correct functionality for operators without multiple parameter

* fix: correct linting

* fix: resolve issue when parameterValue is not an instanceof FindOperator

---------

Co-authored-by: ke <ke@sbs.co.at>

* feat: leftJoinAndMapOne and innerJoinAndMapOne map result to entity (typeorm#9354)

* feat: leftJoinAndMapOne and innerJoinAndMapOne now map correctly with QueryBuilder

When joining to a query builder instead of an entity or table name, typeorm now
correctly supports mapping the result to an entity. This introduces a new argument
to the join functions to supply the join attributes with a source of meta data
for the mapping

For example:

const loadedPost = await connection.manager
      .createQueryBuilder(Post, "post")
      .innerJoinAndMapOne(
           "post.tag",
           qb => qb.from(Tag, "tag"),
           "tag",
           "tag.id = post.tagId",
           undefined,
           // The next argument is new - it helps typeorm know which entity
           // to use to complete the mapping for a query builder.
           Tag
      )
      .where("post.id = :id", { id: post.id })
      .getOne()

* style: Auto Formatting

* trigger CircleCI

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>

* fix: handles "query" relation loading strategy for TreeRepositories (typeorm#9680)

Adds support to loading entities' relationships with "query" strategy for TreeRepositories
Previously the default method was "join". Implementation is done recursively for n-level
relations

Closes: typeorm#9673

* fix: firstCapital=true not working in camelCase() function

* feat: QueryBuilder performance optimizations (typeorm#9914)

* small optimization in driver utils - shortening alias become a bit faster

* added entity metadatas as a map into DataSource for search optimization purposes

* ultra small optimization - looks like symbols work slow. Need to re-think its usage

* small optimizations to improve performance

* replace property names optimization

* tsc error fix

* big optimization - now replacePropertyNames executed only for the final SQL query

* trying to fix the bug in select query builder with orders not being properly replaced with their aliaces

* fixing tests

* version bump

* fix: wrong dependency version in init command

* fix: drop xml & yml connection option support (typeorm#9930)

* version bump

* added package lock

* ci: wait if oracle db is enabled in test suite (typeorm#9946)

* test: cli init with local typeorm package (typeorm#9926)

* test: cli init with local typeorm package

Uses the locally built files instead of the typeorm
package published to npmjs. This enables testing project
initialisation with unreleased typeorm package versions.

* fix: enable init cli to be testable w non-releases

* feat: support for the latest mongodb v5 (typeorm#9925)

* fix: add support for mongodb driver v5

This new fix allow support to mongodb driver v5

Closes: typeorm#7907

* refactor: remove callback from MongoDriver connect

* fix: check for propertyName in transform

* fix: add support for mongodb driver v5

This new fix allow support to mongodb driver v5

Closes: typeorm#7907

* feat: mongodb 5.2.0 typings

* fix: instanceof ObjectId check

Instanceof check now no longer references to just the
type but the loaded class ref instead.

* test: fix test name to mongodb v5

---------

Co-authored-by: Matheus Melo Antiquera <matheusantiquera@finchsolucoes.com.br>
Co-authored-by: tgrassl <grassl.timon@gmail.com>
Co-authored-by: Matheus Melo Antiquera <matheus.melo.a@hotmail.com>

* fix: SelectQueryBuilder builds incorrectly escaped alias in Oracle when used on entity with composite key (typeorm#9668)

* Update SelectQueryBuilder.ts

Bug fix, In case a unique alias is created in first query then result was not getting mapped properly.

* lint fix

---------

Co-authored-by: Dmitry Zotov <dmzt08@gmail.com>

* chore: better console.log (typeorm#9924)

* refactor: combine sqlite json and simple-json handling (typeorm#9937)

* docs: wrong documentation on QueryBuilder.getCount() (typeorm#9935)

* fix: make cache optional fields optional (typeorm#9942)

This patch allows the getFromCache caller to only pass in
identifier or query field, as getFromCache already handles
the identifier and query field checks

Co-authored-by: ru.c <ru@shuffle.com>

* fix: prevent unique index identical to primary key (all sql dialects) (typeorm#9940)

Co-authored-by: Lucian Mocanu <lucian.mocanu@nexontis.com>

* fixed compiler error

* version bump

* docs: issue typeorm#8860 (typeorm#9951)

* fixed: issue typeorm#8860

* example looks rough

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>

* fix: add directConnection options to MongoDB connection (typeorm#9955)

Co-authored-by: afournier <afournier@solocal.com>

* docs: update entity-manager-api.md (typeorm#9956)

typo:
const timber = await manager.findOne(User, { firstName: "Timber" })   →   const timber = await manager.findOneBy(User, { firstName: "Timber" })

Co-authored-by: Jo YoHan <37216082+oxyrinchus@users.noreply.github.com>

* fix: resolve duplicate subscriber updated columns (typeorm#9958)

Closes: typeorm#9948

* fix: select + addOrderBy broke in 0.3.14 (typeorm#9961)

* added test for typeorm#9960
* fixing the issue
* limiting only to postgres because of NULLS FIRST syntax
* lint

* refactor: query methods should accept generic for return type (typeorm#9957)

* query should accept generics

* Update DataSource.ts

* feat: mariadb uuid inet4 inet6 column data type support (typeorm#9845)

* feat: mariadb inet4, inet6, uuid data type support

* refactor: cleanup unnecessary methods

* style: mysqldriver formatting

* fix: handle length column metadata mariadb uuid

* fix: 8832 test suite to verify errors correctly

* style: fix 8832 test formatting

* fix: 8832 error testing cleanup

* fix: remove defaulting column type feature

* style: fix formatting

* fix: remove unnecessary dbms error test

* fix: remove unused import in test

* fix: ensure defaulting uuid generation column type

* fix: mongodb typings breaks the browser version (typeorm#9962)

* fix: exclude mongodb typings from browser

Closes: typeorm#9959

fix: delete unnessecary dummy file

* another fix for bson typings problem in browser

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>

* revert: "refactor: remove date-fns package (typeorm#9634)"

This reverts commit 1fcd9f3

* fix: allow json as alias for longtext mariadb (typeorm#10018)

* fix: express option bug in init command (typeorm#10022)

* Fix express option bug in init command

* fixed esm support in command

* fix linter

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>

* fix: RelationIdLoader has access to queryPlanner when wrapped in transaction (typeorm#9990)

fix issue - createQueryBuilder in repository loses queryplanner when wrapped in txn upsteam until RelationIdLoader

Closes: typeorm#9988

* fix: add `trustServerCertificate` option to `SqlServerConnectionOptions` (typeorm#9985)

* fix: add missing 'trustServerCertificate' option to SqlServerConnectionOptions interface

Closes: typeorm#8093

* docs: add `trustServerCertificate` description to mssql data source options docs

* fix: consistency between jsdoc and docs

---------

Co-authored-by: jrybarczyk <jrybarczyk@exclusiveresorts.com>

* fix: added instanceName to options (typeorm#9968)

* added instanceName to options

* run prettier

---------

Co-authored-by: Jens Horch <horch@hector.de>

* fix: for running cli-ts-node-esm use exit code from child process (typeorm#10030)

Use child process exit code in parent process to properly indicate that child process (migration running) fails

Closes: typeorm#10029

* fix: add onDelete option validation for oracle (typeorm#9786)

* fix: add onDelete option validation for oracle

Closes: typeorm#9189

* refactor: move fk validation logic to EntityMetadataValidator.ts

* fix: skip assertion for other databases

* fix: styles

---------

Co-authored-by: ke <ke@sbs.co.at>

* fix: convert the join table ID to the referenceColumn ID type (typeorm#9887)

* fix: Convert the join table ID to the referenceColumn ID type

* test: add auto-increment-id-as-string test

* style: format auto-increment-id-as-string test

* fix: correct encode mongodb auth credentials (typeorm#10024)

* fix: correct encode mongodb auth credentials

when use the special character `@` into mongodb password result in unauthorized because the it has no encoding

Closes: typeorm#9885

* we need to close connections at the end

* fixed js issue

* adjust import statement

* style: run prettier

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>

* fix: create correct children during cascade saving entities with STI (typeorm#9034)

* test: test saving disciminators STI, cascading

This commit adds an test for checking whether discriminators are saved
correctly when saving a field with cascade that uses
Single-Table-Inheritance.

Related to: typeorm#7758

* fix: Create correct children with STI

This commit fixes the `create` function for EntityManager and Repository
to create entities of correct type when using Single Table Inheritance.
Refactors the otherwise repeated code into a new function on
EntityMetadata.

Related to: typeorm#7758

* test: check STI type setting discriminator manually

Related to: typeorm#9033

* feature: allow setting discriminator value manually

This commit allows using an instance of a base class in a
Single Table Inheritance scenario and setting the discriminator value
manually.

Related to: typeorm#9033

* test: test saving disciminators with trees in STI

This commit adds an test for checking whether discriminators are saved
correctly when saving a tree that also uses Single-Table-Inheritance.

Related to: typeorm#7758

* fix: Create correct children with STI and trees

This commit fixes the `create` function for EntityManager and TreeRepository
to create entities of correct type when using Single Table Inheritance
and complex inheritance with Trees.

Related to: typeorm#7758

* fix: support More/LessThanOrEqual in relations  (typeorm#9978)

* test(select-buildwhere): exercise More/LessThanOrEqual for relations

Extract the relevant test suite from functional/find-options, modifying
the tests to use the equivalent More/LessThanOrEqual operators

* fix(select-buildwhere): support More/LessThanOrEqual for relations

Tweak `buildWhere()` to recognise more find operators and output
the SQL equivalent

- Recognise `moreThanOrEqual` and `lessThanOrEqual`, in addition to
  `moreThan` and `lessThan`
- If the find operator ends with `OrEqual`, append `=` to the
  SQL operator

* code style change

---------

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>

* fix: added transaction retry logic in cockroachdb (typeorm#10032)

* added transaction retry logic in cockroachdb

* added option to control max transaction retries;
added delay before transaction retry;
updated docs;

* fixes in retry logic

* enable storing queries after retrying transaction

* version bump

* test: fix test from typeorm#9034 with STI for Oracle (typeorm#10037)

Oracle does not have a `onUpdate: 'CASCADE'` option.
Thus, the test fixtures had to be adapted.
Checking for the correct `onUpdate` actions for Oracle was introduced in typeorm#9786.

* fix: add missing await (typeorm#10084)

* chore: use new CircleCI convenience images (typeorm#10101)

This commit updates the CircleCI images to the new convenience images
(cimg/... instead of circleci/...), as the old ones were deprecated.
Sadly, they do not come with major-only tags.
See the following blog post for more information:
https://circleci.com/docs/next-gen-migration-guide/

Also, the apt cache was not updated before downloading additional
packages.
Thus, an update of the apt cache should fix getting the right packages.

Related to typeorm#10100

* fix: typeorm#10040 TypeORM synchronize database even if it is up to date (typeorm#10041)

* test: typeorm#10040 TypeORM synchronize database even if it is up to date

* formating

* fix: TypeORM synchronize database even if it is up to date typeorm#10040

* feat: Added back fork spanner changes

* fix lock version

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
Co-authored-by: smile1sky <82568280+smile-sky20@users.noreply.github.com>
Co-authored-by: Bikram Suwal <veekramsuwal@gmail.com>
Co-authored-by: Dominic Ruggiero <dominic@userexe.me>
Co-authored-by: AlexMesser <dmzt08@gmail.com>
Co-authored-by: Danny Koppenhagen <mail@k9n.dev>
Co-authored-by: Oskar Jaskólski <oskarrro90@gmail.com>
Co-authored-by: Barak Shelef <107487965+barakshelef-oasis@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arnaud de Mouhy <1552768+dehy@users.noreply.github.com>
Co-authored-by: Sakura <54829481+Yuuki-Sakura@users.noreply.github.com>
Co-authored-by: Charlton Austin <charlton.austin@gmail.com>
Co-authored-by: Jeffyter Saraiva <35247554+iJhefe@users.noreply.github.com>
Co-authored-by: Patrick Gallagher <pfgallagher@users.noreply.github.com>
Co-authored-by: Coroliov Oleg <1880059+ruscon@users.noreply.github.com>
Co-authored-by: Gonzalo Rodulfo Martínez <23481808+rodzalo@users.noreply.github.com>
Co-authored-by: Charlély Delgrange <charlely.delgrange@gmail.com>
Co-authored-by: Pavel Petrik <redwert@users.noreply.github.com>
Co-authored-by: Pavel <pavel@loanbase.com>
Co-authored-by: kz-d <116164465+kz-d@users.noreply.github.com>
Co-authored-by: Adrian Burlacu <63519230+adrian-burlacu-software@users.noreply.github.com>
Co-authored-by: Adrian Burlacu <adrian.burlacu@live.com>
Co-authored-by: Gentilhomme <gentilhomme.thomas@gmail.com>
Co-authored-by: 4l3ss <2623600+4l3ss@users.noreply.github.com>
Co-authored-by: Dan Manastireanu <498419+danmana@users.noreply.github.com>
Co-authored-by: userUndefined ✌️ <80859038+thalles-victor@users.noreply.github.com>
Co-authored-by: Nedim Arabacı <nedimarabaci@gmail.com>
Co-authored-by: Michael Wolz <michaelwolz93@gmail.com>
Co-authored-by: Morteza PRK <mortezaPRK@users.noreply.github.com>
Co-authored-by: mortzprk <mortz.prk@gmail.com>
Co-authored-by: Bartłomiej Rutkowski <b.rutkowski94@gmail.com>
Co-authored-by: Bartlomiej Rutkowski <brutkowski@tilt.app>
Co-authored-by: Derek Bonner <deekthesqueak@users.noreply.github.com>
Co-authored-by: Tim Beyer <tim.beyer@gmail.com>
Co-authored-by: Kadir <kadiraciktan@gmail.com>
Co-authored-by: leo-jnesis <55386067+leo-jnesis@users.noreply.github.com>
Co-authored-by: Saad A. Bazaz <saadbazaz@hotmail.com>
Co-authored-by: r-shirasu <82349387+r-shirasu@users.noreply.github.com>
Co-authored-by: Mahmoud Almontasser <almontasser@users.noreply.github.com>
Co-authored-by: JesseNeon <62482001+JesseAyegba@users.noreply.github.com>
Co-authored-by: ayuvlasenko <77232221+ayuvlasenko@users.noreply.github.com>
Co-authored-by: sinkhaha <1468709106@qq.com>
Co-authored-by: sinkhaha <1468709606@qq.com>
Co-authored-by: Adrian Parry <44247645+subparry@users.noreply.github.com>
Co-authored-by: Adrian Parry <adrian.parry@reign.cl>
Co-authored-by: James Jurach <james.jurach@gmail.com>
Co-authored-by: James Jurach <James.Jurach@apiture.com>
Co-authored-by: Sho Ogawa <60885375+linus-sh@users.noreply.github.com>
Co-authored-by: Mattias Fjellvang <simplenotezy@users.noreply.github.com>
Co-authored-by: summer-boythink <57977288+summer-boythink@users.noreply.github.com>
Co-authored-by: 변경연 <39257313+eric-byun@users.noreply.github.com>
Co-authored-by: Filip Wróbel <17615126+f-wrobel@users.noreply.github.com>
Co-authored-by: Lukas Spiss <35728419+Spissable@users.noreply.github.com>
Co-authored-by: Pavel Kolpakov <kolpakov-p@yandex.ru>
Co-authored-by: Zeeshan Haider Khan <50953718+zeeshanhaiderkhan@users.noreply.github.com>
Co-authored-by: Josh Heng <josh@joshheng.co.uk>
Co-authored-by: Vítor L. Brasil <97890530+vitorlbrasil@users.noreply.github.com>
Co-authored-by: Dev Aggarwal <22045791+aggarwaldev@users.noreply.github.com>
Co-authored-by: Kilian Finger <hey@kilianfinger.com>
Co-authored-by: Vista1nik <vista1nik@gmail.com>
Co-authored-by: Toshinori Tsugita <tsugita.dev@gmail.com>
Co-authored-by: PronDmytro <67123804+PronDmytro@users.noreply.github.com>
Co-authored-by: ISary-ge <67458138+ISary-ge@users.noreply.github.com>
Co-authored-by: Игорь Сары <isary@MacBook-Pro-Igor.local>
Co-authored-by: dzvyagin <dzvyagin@team.amocrm.com>
Co-authored-by: StefanZivkovic <44195291+StefanZivkovic@users.noreply.github.com>
Co-authored-by: Stefan <stefi@sprintingsoftware.com>
Co-authored-by: Aritz <6377040+xtremebiker@users.noreply.github.com>
Co-authored-by: Khaled Sameer <khaled.smq@hotmail.com>
Co-authored-by: Matheus Melo Antiquera <33763956+MatheusMeloAntiquera@users.noreply.github.com>
Co-authored-by: Matheus Melo Antiquera <matheusantiquera@finchsolucoes.com.br>
Co-authored-by: ZBAGI <zbagi@poczta.fm>
Co-authored-by: Christian Forgács <christian@forgacs.me>
Co-authored-by: Christian Forgács <christian@wunderbit.de>
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <netroy@users.noreply.github.com>
Co-authored-by: 0x269 <33447608+truemogician@users.noreply.github.com>
Co-authored-by: JT Smith <jt@plainblack.com>
Co-authored-by: Ihor Levchenko <ifree92@gmail.com>
Co-authored-by: Peter Hostačný <hostacny.peter@gmail.com>
Co-authored-by: jdgjsag67251 <88368191+jdgjsag67251@users.noreply.github.com>
Co-authored-by: ertl <klaus.ertl1@gmail.com>
Co-authored-by: ke <ke@sbs.co.at>
Co-authored-by: Dylan Seago <dylanseago@users.noreply.github.com>
Co-authored-by: Philipp Dyck <pdyck@users.noreply.github.com>
Co-authored-by: Leon Miller-Out <leon@singlebrook.com>
Co-authored-by: GP4cK <gautier.bayzelon@gmail.com>
Co-authored-by: Daniel Huth <4455258+Agreon@users.noreply.github.com>
Co-authored-by: dmytroboiko <dmytro@pipernet.com>
Co-authored-by: Dmytro Boiko <dmitriy.b@tracktica.com>
Co-authored-by: Alexander Kraev <98308330+alexander-kraev-snyk@users.noreply.github.com>
Co-authored-by: Gabriel Kim <68445851+gabrielkim13@users.noreply.github.com>
Co-authored-by: Joe Mizzi <themizzi@me.com>
Co-authored-by: Nguyen Ba Hung <bahung1221@gmail.com>
Co-authored-by: sinopsysHK <sinofwd@gmail.com>
Co-authored-by: acuthbert <acuthbert@gcdtech.com>
Co-authored-by: Jose Toscano <42146866+JoseCToscano@users.noreply.github.com>
Co-authored-by: mptr <54647612+mptr@users.noreply.github.com>
Co-authored-by: tgrassl <grassl.timon@gmail.com>
Co-authored-by: Matheus Melo Antiquera <matheus.melo.a@hotmail.com>
Co-authored-by: Alankarsharma <alankar.sharma005@gmail.com>
Co-authored-by: Stafford Williams <staff0rd@users.noreply.github.com>
Co-authored-by: Bengt Weiße <bengtler@gmail.com>
Co-authored-by: ☃ Elliot Shepherd <elliot@jarofworms.com>
Co-authored-by: RustySol <93598467+RustySol@users.noreply.github.com>
Co-authored-by: ru.c <ru@shuffle.com>
Co-authored-by: Lucian Mocanu <alumni@users.noreply.github.com>
Co-authored-by: Lucian Mocanu <lucian.mocanu@nexontis.com>
Co-authored-by: Ezekiel Adetoro <39957559+adetorodev@users.noreply.github.com>
Co-authored-by: Alexis Fournier <75622873+a-fournier@users.noreply.github.com>
Co-authored-by: afournier <afournier@solocal.com>
Co-authored-by: Jo YoHan <37216082+Slowhigh@users.noreply.github.com>
Co-authored-by: Jo YoHan <37216082+oxyrinchus@users.noreply.github.com>
Co-authored-by: spotykatch <andrey.dashevskiy@yandex.ru>
Co-authored-by: Eliya Cohen <co.eliya2@gmail.com>
Co-authored-by: smith-xyz <51304449+smith-xyz@users.noreply.github.com>
Co-authored-by: YoungKi Lyu <youngkiu@gmail.com>
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
Co-authored-by: Joe Rybarczyk <95554565+99xtal@users.noreply.github.com>
Co-authored-by: jrybarczyk <jrybarczyk@exclusiveresorts.com>
Co-authored-by: Jens Horch <jenshorch@icloud.com>
Co-authored-by: Jens Horch <horch@hector.de>
Co-authored-by: Sergey Pahuta <siarhei.pakhuta@mapbox.com>
Co-authored-by: tqh177 <42137654+tqh177@users.noreply.github.com>
Co-authored-by: leoojg <leoojg@gmail.com>
Co-authored-by: Felix Gohla <37421906+felix-gohla@users.noreply.github.com>
Co-authored-by: LoneRifle <LoneRifle@users.noreply.github.com>
Co-authored-by: pro100kryto <47232701+pro100kryto@users.noreply.github.com>
Co-authored-by: juliengbt <48599640+juliengbt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants