-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Generated asExpression
columns not in RETURNING
clause on save
#8450
Generated asExpression
columns not in RETURNING
clause on save
#8450
Comments
I never intended this feature for usage with PrimaryColumn. Is this the only way how you could archive this? |
I have thought of making Addition: using the computed |
RETURNING
clause on save - PostgreSQL database
It seems the issue of not returning the generated column is not specific to cascaded inserts, nor to primary columns. I have updated the issue quite a bit, so please read it again. |
RETURNING
clause on save - PostgreSQL databaseasExpression
columns not in RETURNING
clause on save
I can confirm this bug still exists on #8472 is closed for some reason, but @pleerock can you advice was this PR a right fix? With the current master, this is how we fixed it thanks to https://www.npmjs.com/package/patch-package diff --git a/node_modules/typeorm/metadata/EntityMetadata.js b/node_modules/typeorm/metadata/EntityMetadata.js
index f12c352..8c47ebe 100644
--- a/node_modules/typeorm/metadata/EntityMetadata.js
+++ b/node_modules/typeorm/metadata/EntityMetadata.js
@@ -678,6 +678,7 @@ class EntityMetadata {
getInsertionReturningColumns() {
return this.columns.filter((column) => {
return (column.default !== undefined ||
+ column.asExpression ||
column.isGenerated ||
column.isCreateDate ||
column.isUpdateDate ||
|
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [typeorm](https://typeorm.io) ([source](https://github.com/typeorm/typeorm)) | dependencies | patch | [`0.3.17` -> `0.3.20`](https://renovatebot.com/diffs/npm/typeorm/0.3.17/0.3.20) | --- ### Release Notes <details> <summary>typeorm/typeorm (typeorm)</summary> ### [`v0.3.20`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0320-2024-01-26) [Compare Source](typeorm/typeorm@0.3.19...0.3.20) ##### Bug Fixes - added missing parentheses in where conditions ([#​10650](typeorm/typeorm#10650)) ([4624930](typeorm/typeorm@4624930)), closes [#​10534](typeorm/typeorm#10534) - don't escape indexPredicate ([#​10618](typeorm/typeorm#10618)) ([dd49a25](typeorm/typeorm@dd49a25)) - fallback runMigrations transaction to DataSourceOptions ([#​10601](typeorm/typeorm#10601)) ([0cab0dd](typeorm/typeorm@0cab0dd)) - hangup when load relations with relationLoadStrategy: query ([#​10630](typeorm/typeorm#10630)) ([54d8d9e](typeorm/typeorm@54d8d9e)), closes [#​10481](typeorm/typeorm#10481) - include asExpression columns in returning clause ([#​10632](typeorm/typeorm#10632)) ([f232ba7](typeorm/typeorm@f232ba7)), closes [#​8450](typeorm/typeorm#8450) [#​8450](typeorm/typeorm#8450) - multiple insert in SAP Hana ([#​10597](typeorm/typeorm#10597)) ([1b34c9a](typeorm/typeorm@1b34c9a)) - resolve issue CREATE/DROP Index concurrently ([#​10634](typeorm/typeorm#10634)) ([8aa8690](typeorm/typeorm@8aa8690)), closes [#​10626](typeorm/typeorm#10626) - type inferencing of EntityManager#create ([#​10569](typeorm/typeorm#10569)) ([99d8249](typeorm/typeorm@99d8249)) ##### Features - add json type support for Oracle ([#​10611](typeorm/typeorm#10611)) ([7e85460](typeorm/typeorm@7e85460)) - add postgres multirange column types ([#​10627](typeorm/typeorm#10627)) ([d0b7670](typeorm/typeorm@d0b7670)), closes [#​10556](typeorm/typeorm#10556) - add table comment for postgres ([#​10613](typeorm/typeorm#10613)) ([4493db4](typeorm/typeorm@4493db4)) ##### Reverts - Revert "fix: prevent using absolute table path in migrations unless required ([#​10123](typeorm/typeorm#10123))" ([#​10624](typeorm/typeorm#10624)) ([8f371f2](typeorm/typeorm@8f371f2)), closes [#​10123](typeorm/typeorm#10123) [#​10624](typeorm/typeorm#10624) - revert "feat: nullable embedded entities ([#​10289](typeorm/typeorm#10289))" ([#​10614](typeorm/typeorm#10614)) ([15de46f](typeorm/typeorm@15de46f)), closes [#​10289](typeorm/typeorm#10289) [#​10614](typeorm/typeorm#10614) ### [`v0.3.19`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0319-2024-01-03) [Compare Source](typeorm/typeorm@0.3.18...0.3.19) ##### Bug Fixes - fixed `Cannot read properties of undefined (reading 'sync')` caused after glob package upgrade ### [`v0.3.18`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0318-2024-01-03) [Compare Source](typeorm/typeorm@0.3.17...0.3.18) ##### Bug Fixes - add BaseEntity to model-shim ([#​10503](typeorm/typeorm#10503)) ([3cf938e](typeorm/typeorm@3cf938e)) - add error handling for missing join columns ([#​10525](typeorm/typeorm#10525)) ([122c897](typeorm/typeorm@122c897)), closes [#​7034](typeorm/typeorm#7034) - add missing export for View class ([#​10261](typeorm/typeorm#10261)) ([7adbc9b](typeorm/typeorm@7adbc9b)) - added fail callback while opening the database in Cordova ([#​10566](typeorm/typeorm#10566)) ([8b4df5b](typeorm/typeorm@8b4df5b)) - aggregate function throw error when column alias name is set ([#​10035](typeorm/typeorm#10035)) ([022d2b5](typeorm/typeorm@022d2b5)), closes [#​9927](typeorm/typeorm#9927) - backport postgres connection error handling to crdb ([#​10177](typeorm/typeorm#10177)) ([149226d](typeorm/typeorm@149226d)) - bump better-sqlite3 version range ([#​10452](typeorm/typeorm#10452)) ([75ec8f2](typeorm/typeorm@75ec8f2)) - caching always enabled not caching queries ([#​10524](typeorm/typeorm#10524)) ([8af533f](typeorm/typeorm@8af533f)) - circular dependency breaking node.js 20.6 ([#​10344](typeorm/typeorm#10344)) ([ba7ad3c](typeorm/typeorm@ba7ad3c)), closes [#​10338](typeorm/typeorm#10338) - correctly keep query.data from ormOption for commit / rollback subscribers ([#​10151](typeorm/typeorm#10151)) ([73ee70b](typeorm/typeorm@73ee70b)) - default value in child table/entity column decorator for multiple table inheritance is ignored for inherited columns ([#​10563](typeorm/typeorm#10563)) ([#​10564](typeorm/typeorm#10564)) ([af77a5d](typeorm/typeorm@af77a5d)) - deletedAt column leaking as side effect of object update while creating a row ([#​10435](typeorm/typeorm#10435)) ([7de4890](typeorm/typeorm@7de4890)) - empty objects being hydrated when eager loading relations that have a `@VirtualColumn` ([#​10432](typeorm/typeorm#10432)) ([b53e410](typeorm/typeorm@b53e410)), closes [#​10431](typeorm/typeorm#10431) - extend GiST index with range types for Postgres driver ([#​10572](typeorm/typeorm#10572)) ([a4900ae](typeorm/typeorm@a4900ae)), closes [#​10567](typeorm/typeorm#10567) - ignore changes for columns with `update: false` in persistence ([#​10250](typeorm/typeorm#10250)) ([f8fa1fd](typeorm/typeorm@f8fa1fd)), closes [#​10249](typeorm/typeorm#10249) - improve helper for cli for commands missing positionals ([#​10133](typeorm/typeorm#10133)) ([9f8899f](typeorm/typeorm@9f8899f)) - loading datasource unable to process a regular default export ([#​10184](typeorm/typeorm#10184)) ([201342d](typeorm/typeorm@201342d)), closes [#​8810](typeorm/typeorm#8810) - logMigration has incorrect logging condition ([#​10323](typeorm/typeorm#10323)) ([d41930f](typeorm/typeorm@d41930f)), closes [#​10322](typeorm/typeorm#10322) [#​10322](typeorm/typeorm#10322) - ManyToMany ER_DUP_ENTRY error ([#​10343](typeorm/typeorm#10343)) ([e296063](typeorm/typeorm@e296063)), closes [#​5704](typeorm/typeorm#5704) - migrations on indexed TIMESTAMP WITH TIME ZONE Oracle columns ([#​10506](typeorm/typeorm#10506)) ([cf37f13](typeorm/typeorm@cf37f13)), closes [#​10493](typeorm/typeorm#10493) - mongodb - undefined is not constructor ([#​10559](typeorm/typeorm#10559)) ([ad5bf11](typeorm/typeorm@ad5bf11)) - mongodb resolves leaked cursor ([#​10316](typeorm/typeorm#10316)) ([2dc9624](typeorm/typeorm@2dc9624)), closes [#​10315](typeorm/typeorm#10315) - mssql datasource testonborrow not affecting anything ([#​10589](typeorm/typeorm#10589)) ([122b683](typeorm/typeorm@122b683)) - nested transactions issues ([#​10210](typeorm/typeorm#10210)) ([25e6ecd](typeorm/typeorm@25e6ecd)) - prevent using absolute table path in migrations unless required ([#​10123](typeorm/typeorm#10123)) ([dd59524](typeorm/typeorm@dd59524)) - remove `date-fns` in favor of `DayJs` ([#​10306](typeorm/typeorm#10306)) ([cf7147f](typeorm/typeorm@cf7147f)) - remove dynamic require calls ([#​10196](typeorm/typeorm#10196)) ([a939654](typeorm/typeorm@a939654)) - resolve circular dependency when using Vite ([#​10273](typeorm/typeorm#10273)) ([080528b](typeorm/typeorm@080528b)) - resolve issue building eager relation alias for nested relations ([#​10004](typeorm/typeorm#10004)) ([c6f608d](typeorm/typeorm@c6f608d)), closes [#​9944](typeorm/typeorm#9944) - resolve issue of generating migration for numeric arrays repeatedly ([#​10471](typeorm/typeorm#10471)) ([39fdcf6](typeorm/typeorm@39fdcf6)), closes [#​10043](typeorm/typeorm#10043) - resolve issue queryBuilder makes different parameter identifiers for same parameter ([#​10327](typeorm/typeorm#10327)) ([6c918ea](typeorm/typeorm@6c918ea)), closes [#​7308](typeorm/typeorm#7308) - resolve issues on upsert ([#​10588](typeorm/typeorm#10588)) ([dc1bfed](typeorm/typeorm@dc1bfed)), closes [#​10587](typeorm/typeorm#10587) - scrub all comment end markers from comments ([#​10163](typeorm/typeorm#10163)) ([d937f61](typeorm/typeorm@d937f61)) - serialize bigint when building a query id [#​10336](typeorm/typeorm#10336) ([#​10337](typeorm/typeorm#10337)) ([bfc1cc5](typeorm/typeorm@bfc1cc5)) - should automatically cache if alwaysEnable ([#​10137](typeorm/typeorm#10137)) ([173910e](typeorm/typeorm@173910e)), closes [#​9910](typeorm/typeorm#9910) - SQLite simple-enum column parsing ([#​10550](typeorm/typeorm#10550)) ([696e688](typeorm/typeorm@696e688)) - update UpdateDateColumn on upsert ([#​10458](typeorm/typeorm#10458)) ([fdb9866](typeorm/typeorm@fdb9866)), closes [#​9015](typeorm/typeorm#9015) - upgrade ts-node version to latest(10.9.1) version ([#​10143](typeorm/typeorm#10143)) ([fcb9904](typeorm/typeorm@fcb9904)) - using async datasource to configure typeorm ([#​10170](typeorm/typeorm#10170)) ([fbd45db](typeorm/typeorm@fbd45db)) ##### Features - ability to change default replication mode ([#​10419](typeorm/typeorm#10419)) ([72b1d1b](typeorm/typeorm@72b1d1b)) - add concurrent indexes for postgres ([#​10442](typeorm/typeorm#10442)) ([f4e6eaf](typeorm/typeorm@f4e6eaf)) - add exists and exists by ([#​10291](typeorm/typeorm#10291)) ([b6b46fb](typeorm/typeorm@b6b46fb)) - add isolated where statements ([#​10213](typeorm/typeorm#10213)) ([3cda7ec](typeorm/typeorm@3cda7ec)) - add MSSQL disableAsciiToUnicodeParamConversion option and tests ([#​10161](typeorm/typeorm#10161)) ([df7c069](typeorm/typeorm@df7c069)), closes [#​10131](typeorm/typeorm#10131) - add support for mssql server DefaultAzureCredential usage ([#​10246](typeorm/typeorm#10246)) ([c8ee5b1](typeorm/typeorm@c8ee5b1)) - add support for table comment in MySQL ([#​10017](typeorm/typeorm#10017)) ([338df16](typeorm/typeorm@338df16)) - allow to use custom type witch extends object type for find where argument ([#​10475](typeorm/typeorm#10475)) ([48f5f85](typeorm/typeorm@48f5f85)) - BeforeQuery and AfterQuery events ([#​10234](typeorm/typeorm#10234)) ([5c28154](typeorm/typeorm@5c28154)), closes [#​3302](typeorm/typeorm#3302) - custom STI discriminator value for EntitySchema ([#​10508](typeorm/typeorm#10508)) ([b240d87](typeorm/typeorm@b240d87)), closes [#​10494](typeorm/typeorm#10494) - enabled CTE for oracle driver ([#​10319](typeorm/typeorm#10319)) ([65858f3](typeorm/typeorm@65858f3)) - entityId in InsertEvent ([#​10540](typeorm/typeorm#10540)) ([ae006af](typeorm/typeorm@ae006af)) - expose countDocuments in mongodb ([#​10314](typeorm/typeorm#10314)) ([ebd61d1](typeorm/typeorm@ebd61d1)) - exposed entity and criteria properties on EntityNotFoundError ([#​10202](typeorm/typeorm#10202)) ([bafcd17](typeorm/typeorm@bafcd17)) - implement column comments for SAP HANA ([#​10502](typeorm/typeorm#10502)) ([45e31cc](typeorm/typeorm@45e31cc)) - implement OR operator ([#​10086](typeorm/typeorm#10086)) ([a00b1df](typeorm/typeorm@a00b1df)), closes [#​10054](typeorm/typeorm#10054) [#​10054](typeorm/typeorm#10054) [#​10054](typeorm/typeorm#10054) [#​10054](typeorm/typeorm#10054) [#​10054](typeorm/typeorm#10054) [#​10054](typeorm/typeorm#10054) [#​10054](typeorm/typeorm#10054) - implement streaming for SAP HANA ([#​10512](typeorm/typeorm#10512)) ([7e9cead](typeorm/typeorm@7e9cead)) - implements QueryFailedError generic for driverError typing ([#​10253](typeorm/typeorm#10253)) ([78b2f48](typeorm/typeorm@78b2f48)) - modify repository.extend method for chaining repositories ([#​10256](typeorm/typeorm#10256)) ([ca29c0f](typeorm/typeorm@ca29c0f)) - nullable embedded entities ([#​10289](typeorm/typeorm#10289)) ([e67d704](typeorm/typeorm@e67d704)) - support for MongoDB 6.x ([#​10545](typeorm/typeorm#10545)) ([3647b26](typeorm/typeorm@3647b26)) - support mssql@10 ([#​10356](typeorm/typeorm#10356)) ([f6bb671](typeorm/typeorm@f6bb671)), closes [#​10340](typeorm/typeorm#10340) - use node-oracledb 6 ([#​10285](typeorm/typeorm#10285)) ([3af891a](typeorm/typeorm@3af891a)), closes [#​10277](typeorm/typeorm#10277) - user-defined index name for STI discriminator column ([#​10509](typeorm/typeorm#10509)) ([89c5257](typeorm/typeorm@89c5257)), closes [#​10496](typeorm/typeorm#10496) ##### Performance Improvements - improve SapQueryRunner performance ([#​10198](typeorm/typeorm#10198)) ([f6b87e3](typeorm/typeorm@f6b87e3)) ##### BREAKING CHANGES - With node-oracledb the thin client is used as default. Added a option to use the thick client. Also added the option to specify the instant client lib - MongoDB: from the previous behavior of returning a result with metadata describing when a document is not found. See: https://github.com/mongodb/node-mongodb-native/blob/HEAD/etc/notes/CHANGES\_6.0.0.md - [new nullable embeds feature](typeorm/typeorm#10289) introduced a breaking change which might enforce you to update types on your entities to ` | null `, if all columns in your embed entity are nullable. Since database queries now return embedded property as `null` if all its column values are null. </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:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=--> Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/395 Reviewed-by: Vylpes <ethan@vylpes.com> Co-authored-by: Renovate Bot <renovate@vylpes.com> Co-committed-by: Renovate Bot <renovate@vylpes.com>
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [typeorm](https://typeorm.io) ([source](https://github.com/typeorm/typeorm)) | dependencies | patch | [`0.3.17` -> `0.3.20`](https://renovatebot.com/diffs/npm/typeorm/0.3.17/0.3.20) | --- ### Release Notes <details> <summary>typeorm/typeorm (typeorm)</summary> ### [`v0.3.20`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0320-2024-01-26) [Compare Source](typeorm/typeorm@0.3.19...0.3.20) ##### Bug Fixes - added missing parentheses in where conditions ([#​10650](typeorm/typeorm#10650)) ([4624930](typeorm/typeorm@4624930)), closes [#​10534](typeorm/typeorm#10534) - don't escape indexPredicate ([#​10618](typeorm/typeorm#10618)) ([dd49a25](typeorm/typeorm@dd49a25)) - fallback runMigrations transaction to DataSourceOptions ([#​10601](typeorm/typeorm#10601)) ([0cab0dd](typeorm/typeorm@0cab0dd)) - hangup when load relations with relationLoadStrategy: query ([#​10630](typeorm/typeorm#10630)) ([54d8d9e](typeorm/typeorm@54d8d9e)), closes [#​10481](typeorm/typeorm#10481) - include asExpression columns in returning clause ([#​10632](typeorm/typeorm#10632)) ([f232ba7](typeorm/typeorm@f232ba7)), closes [#​8450](typeorm/typeorm#8450) [#​8450](typeorm/typeorm#8450) - multiple insert in SAP Hana ([#​10597](typeorm/typeorm#10597)) ([1b34c9a](typeorm/typeorm@1b34c9a)) - resolve issue CREATE/DROP Index concurrently ([#​10634](typeorm/typeorm#10634)) ([8aa8690](typeorm/typeorm@8aa8690)), closes [#​10626](typeorm/typeorm#10626) - type inferencing of EntityManager#create ([#​10569](typeorm/typeorm#10569)) ([99d8249](typeorm/typeorm@99d8249)) ##### Features - add json type support for Oracle ([#​10611](typeorm/typeorm#10611)) ([7e85460](typeorm/typeorm@7e85460)) - add postgres multirange column types ([#​10627](typeorm/typeorm#10627)) ([d0b7670](typeorm/typeorm@d0b7670)), closes [#​10556](typeorm/typeorm#10556) - add table comment for postgres ([#​10613](typeorm/typeorm#10613)) ([4493db4](typeorm/typeorm@4493db4)) ##### Reverts - Revert "fix: prevent using absolute table path in migrations unless required ([#​10123](typeorm/typeorm#10123))" ([#​10624](typeorm/typeorm#10624)) ([8f371f2](typeorm/typeorm@8f371f2)), closes [#​10123](typeorm/typeorm#10123) [#​10624](typeorm/typeorm#10624) - revert "feat: nullable embedded entities ([#​10289](typeorm/typeorm#10289))" ([#​10614](typeorm/typeorm#10614)) ([15de46f](typeorm/typeorm@15de46f)), closes [#​10289](typeorm/typeorm#10289) [#​10614](typeorm/typeorm#10614) ### [`v0.3.19`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0319-2024-01-03) [Compare Source](typeorm/typeorm@0.3.18...0.3.19) ##### Bug Fixes - fixed `Cannot read properties of undefined (reading 'sync')` caused after glob package upgrade ### [`v0.3.18`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0318-2024-01-03) [Compare Source](typeorm/typeorm@0.3.17...0.3.18) ##### Bug Fixes - add BaseEntity to model-shim ([#​10503](typeorm/typeorm#10503)) ([3cf938e](typeorm/typeorm@3cf938e)) - add error handling for missing join columns ([#​10525](typeorm/typeorm#10525)) ([122c897](typeorm/typeorm@122c897)), closes [#​7034](typeorm/typeorm#7034) - add missing export for View class ([#​10261](typeorm/typeorm#10261)) ([7adbc9b](typeorm/typeorm@7adbc9b)) - added fail callback while opening the database in Cordova ([#​10566](typeorm/typeorm#10566)) ([8b4df5b](typeorm/typeorm@8b4df5b)) - aggregate function throw error when column alias name is set ([#​10035](typeorm/typeorm#10035)) ([022d2b5](typeorm/typeorm@022d2b5)), closes [#​9927](typeorm/typeorm#9927) - backport postgres connection error handling to crdb ([#​10177](typeorm/typeorm#10177)) ([149226d](typeorm/typeorm@149226d)) - bump better-sqlite3 version range ([#​10452](typeorm/typeorm#10452)) ([75ec8f2](typeorm/typeorm@75ec8f2)) - caching always enabled not caching queries ([#​10524](typeorm/typeorm#10524)) ([8af533f](typeorm/typeorm@8af533f)) - circular dependency breaking node.js 20.6 ([#​10344](typeorm/typeorm#10344)) ([ba7ad3c](typeorm/typeorm@ba7ad3c)), closes [#​10338](typeorm/typeorm#10338) - correctly keep query.data from ormOption for commit / rollback subscribers ([#​10151](typeorm/typeorm#10151)) ([73ee70b](typeorm/typeorm@73ee70b)) - default value in child table/entity column decorator for multiple table inheritance is ignored for inherited columns ([#​10563](typeorm/typeorm#10563)) ([#​10564](typeorm/typeorm#10564)) ([af77a5d](typeorm/typeorm@af77a5d)) - deletedAt column leaking as side effect of object update while creating a row ([#​10435](typeorm/typeorm#10435)) ([7de4890](typeorm/typeorm@7de4890)) - empty objects being hydrated when eager loading relations that have a `@VirtualColumn` ([#​10432](typeorm/typeorm#10432)) ([b53e410](typeorm/typeorm@b53e410)), closes [#​10431](typeorm/typeorm#10431) - extend GiST index with range types for Postgres driver ([#​10572](typeorm/typeorm#10572)) ([a4900ae](typeorm/typeorm@a4900ae)), closes [#​10567](typeorm/typeorm#10567) - ignore changes for columns with `update: false` in persistence ([#​10250](typeorm/typeorm#10250)) ([f8fa1fd](typeorm/typeorm@f8fa1fd)), closes [#​10249](typeorm/typeorm#10249) - improve helper for cli for commands missing positionals ([#​10133](typeorm/typeorm#10133)) ([9f8899f](typeorm/typeorm@9f8899f)) - loading datasource unable to process a regular default export ([#​10184](typeorm/typeorm#10184)) ([201342d](typeorm/typeorm@201342d)), closes [#​8810](typeorm/typeorm#8810) - logMigration has incorrect logging condition ([#​10323](typeorm/typeorm#10323)) ([d41930f](typeorm/typeorm@d41930f)), closes [#​10322](typeorm/typeorm#10322) [#​10322](typeorm/typeorm#10322) - ManyToMany ER_DUP_ENTRY error ([#​10343](typeorm/typeorm#10343)) ([e296063](typeorm/typeorm@e296063)), closes [#​5704](typeorm/typeorm#5704) - migrations on indexed TIMESTAMP WITH TIME ZONE Oracle columns ([#​10506](typeorm/typeorm#10506)) ([cf37f13](typeorm/typeorm@cf37f13)), closes [#​10493](typeorm/typeorm#10493) - mongodb - undefined is not constructor ([#​10559](typeorm/typeorm#10559)) ([ad5bf11](typeorm/typeorm@ad5bf11)) - mongodb resolves leaked cursor ([#​10316](typeorm/typeorm#10316)) ([2dc9624](typeorm/typeorm@2dc9624)), closes [#​10315](typeorm/typeorm#10315) - mssql datasource testonborrow not affecting anything ([#​10589](typeorm/typeorm#10589)) ([122b683](typeorm/typeorm@122b683)) - nested transactions issues ([#​10210](typeorm/typeorm#10210)) ([25e6ecd](typeorm/typeorm@25e6ecd)) - prevent using absolute table path in migrations unless required ([#​10123](typeorm/typeorm#10123)) ([dd59524](typeorm/typeorm@dd59524)) - remove `date-fns` in favor of `DayJs` ([#​10306](typeorm/typeorm#10306)) ([cf7147f](typeorm/typeorm@cf7147f)) - remove dynamic require calls ([#​10196](typeorm/typeorm#10196)) ([a939654](typeorm/typeorm@a939654)) - resolve circular dependency when using Vite ([#​10273](typeorm/typeorm#10273)) ([080528b](typeorm/typeorm@080528b)) - resolve issue building eager relation alias for nested relations ([#​10004](typeorm/typeorm#10004)) ([c6f608d](typeorm/typeorm@c6f608d)), closes [#​9944](typeorm/typeorm#9944) - resolve issue of generating migration for numeric arrays repeatedly ([#​10471](typeorm/typeorm#10471)) ([39fdcf6](typeorm/typeorm@39fdcf6)), closes [#​10043](typeorm/typeorm#10043) - resolve issue queryBuilder makes different parameter identifiers for same parameter ([#​10327](typeorm/typeorm#10327)) ([6c918ea](typeorm/typeorm@6c918ea)), closes [#​7308](typeorm/typeorm#7308) - resolve issues on upsert ([#​10588](typeorm/typeorm#10588)) ([dc1bfed](typeorm/typeorm@dc1bfed)), closes [#​10587](typeorm/typeorm#10587) - scrub all comment end markers from comments ([#​10163](typeorm/typeorm#10163)) ([d937f61](typeorm/typeorm@d937f61)) - serialize bigint when building a query id [#​10336](typeorm/typeorm#10336) ([#​10337](typeorm/typeorm#10337)) ([bfc1cc5](typeorm/typeorm@bfc1cc5)) - should automatically cache if alwaysEnable ([#​10137](typeorm/typeorm#10137)) ([173910e](typeorm/typeorm@173910e)), closes [#​9910](typeorm/typeorm#9910) - SQLite simple-enum column parsing ([#​10550](typeorm/typeorm#10550)) ([696e688](typeorm/typeorm@696e688)) - update UpdateDateColumn on upsert ([#​10458](typeorm/typeorm#10458)) ([fdb9866](typeorm/typeorm@fdb9866)), closes [#​9015](typeorm/typeorm#9015) - upgrade ts-node version to latest(10.9.1) version ([#​10143](typeorm/typeorm#10143)) ([fcb9904](typeorm/typeorm@fcb9904)) - using async datasource to configure typeorm ([#​10170](typeorm/typeorm#10170)) ([fbd45db](typeorm/typeorm@fbd45db)) ##### Features - ability to change default replication mode ([#​10419](typeorm/typeorm#10419)) ([72b1d1b](typeorm/typeorm@72b1d1b)) - add concurrent indexes for postgres ([#​10442](typeorm/typeorm#10442)) ([f4e6eaf](typeorm/typeorm@f4e6eaf)) - add exists and exists by ([#​10291](typeorm/typeorm#10291)) ([b6b46fb](typeorm/typeorm@b6b46fb)) - add isolated where statements ([#​10213](typeorm/typeorm#10213)) ([3cda7ec](typeorm/typeorm@3cda7ec)) - add MSSQL disableAsciiToUnicodeParamConversion option and tests ([#​10161](typeorm/typeorm#10161)) ([df7c069](typeorm/typeorm@df7c069)), closes [#​10131](typeorm/typeorm#10131) - add support for mssql server DefaultAzureCredential usage ([#​10246](typeorm/typeorm#10246)) ([c8ee5b1](typeorm/typeorm@c8ee5b1)) - add support for table comment in MySQL ([#​10017](typeorm/typeorm#10017)) ([338df16](typeorm/typeorm@338df16)) - allow to use custom type witch extends object type for find where argument ([#​10475](typeorm/typeorm#10475)) ([48f5f85](typeorm/typeorm@48f5f85)) - BeforeQuery and AfterQuery events ([#​10234](typeorm/typeorm#10234)) ([5c28154](typeorm/typeorm@5c28154)), closes [#​3302](typeorm/typeorm#3302) - custom STI discriminator value for EntitySchema ([#​10508](typeorm/typeorm#10508)) ([b240d87](typeorm/typeorm@b240d87)), closes [#​10494](typeorm/typeorm#10494) - enabled CTE for oracle driver ([#​10319](typeorm/typeorm#10319)) ([65858f3](typeorm/typeorm@65858f3)) - entityId in InsertEvent ([#​10540](typeorm/typeorm#10540)) ([ae006af](typeorm/typeorm@ae006af)) - expose countDocuments in mongodb ([#​10314](typeorm/typeorm#10314)) ([ebd61d1](typeorm/typeorm@ebd61d1)) - exposed entity and criteria properties on EntityNotFoundError ([#​10202](typeorm/typeorm#10202)) ([bafcd17](typeorm/typeorm@bafcd17)) - implement column comments for SAP HANA ([#​10502](typeorm/typeorm#10502)) ([45e31cc](typeorm/typeorm@45e31cc)) - implement OR operator ([#​10086](typeorm/typeorm#10086)) ([a00b1df](typeorm/typeorm@a00b1df)), closes [#​10054](typeorm/typeorm#10054) [#​10054](typeorm/typeorm#10054) [#​10054](typeorm/typeorm#10054) [#​10054](typeorm/typeorm#10054) [#​10054](typeorm/typeorm#10054) [#​10054](typeorm/typeorm#10054) [#​10054](typeorm/typeorm#10054) - implement streaming for SAP HANA ([#​10512](typeorm/typeorm#10512)) ([7e9cead](typeorm/typeorm@7e9cead)) - implements QueryFailedError generic for driverError typing ([#​10253](typeorm/typeorm#10253)) ([78b2f48](typeorm/typeorm@78b2f48)) - modify repository.extend method for chaining repositories ([#​10256](typeorm/typeorm#10256)) ([ca29c0f](typeorm/typeorm@ca29c0f)) - nullable embedded entities ([#​10289](typeorm/typeorm#10289)) ([e67d704](typeorm/typeorm@e67d704)) - support for MongoDB 6.x ([#​10545](typeorm/typeorm#10545)) ([3647b26](typeorm/typeorm@3647b26)) - support mssql@10 ([#​10356](typeorm/typeorm#10356)) ([f6bb671](typeorm/typeorm@f6bb671)), closes [#​10340](typeorm/typeorm#10340) - use node-oracledb 6 ([#​10285](typeorm/typeorm#10285)) ([3af891a](typeorm/typeorm@3af891a)), closes [#​10277](typeorm/typeorm#10277) - user-defined index name for STI discriminator column ([#​10509](typeorm/typeorm#10509)) ([89c5257](typeorm/typeorm@89c5257)), closes [#​10496](typeorm/typeorm#10496) ##### Performance Improvements - improve SapQueryRunner performance ([#​10198](typeorm/typeorm#10198)) ([f6b87e3](typeorm/typeorm@f6b87e3)) ##### BREAKING CHANGES - With node-oracledb the thin client is used as default. Added a option to use the thick client. Also added the option to specify the instant client lib - MongoDB: from the previous behavior of returning a result with metadata describing when a document is not found. See: https://github.com/mongodb/node-mongodb-native/blob/HEAD/etc/notes/CHANGES\_6.0.0.md - [new nullable embeds feature](typeorm/typeorm#10289) introduced a breaking change which might enforce you to update types on your entities to ` | null `, if all columns in your embed entity are nullable. Since database queries now return embedded property as `null` if all its column values are null. </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:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=--> Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/Droplet/pulls/258 Reviewed-by: Vylpes <ethan@vylpes.com> Co-authored-by: Renovate Bot <renovate@vylpes.com> Co-committed-by: Renovate Bot <renovate@vylpes.com>
Issue Description
When an entity with a
STORED
generated column is saved, the generated column is not included in theRETURNING
clause, causing the object not to get populated with the generated column's value.Expected Behavior
The generated
generated
column is in the RETURNING statement.Actual Behavior
Using the new stored generated column type:
As you can see, the column
generated
is not in the RETURNING statement, which causes the entity not to get populated properly with the column's value:Steps to Reproduce
The code I use to test this:
My Environment
Additional Context
The generated column feature was implemented in the PostgreSQL driver by #6469, so perhaps @TheNoim knows what's missing.
The column seems to be missing from this array:
typeorm/src/query-builder/ReturningResultsEntityUpdator.ts
Lines 172 to 187 in 90a8deb
column.isGenerated
is false, to be specific.Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: