You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Eager relations with DeleteDateColumn override manually requested relations with nested properties #11265
When performing a TypeORM query with both manually specified relations and eager relations of entity with DeleteDateColumn, the current implementation incorrectly overwrites manually loaded relation data with partial eager relation data. This leads to loss of detailed information for manually requested nested relations.
Expected Behavior
Manually specified relations should be preserved in full
Eager relations should complement, not replace, existing relation data
Nested relations within manually specified relations should remain intact
When multiple relation loading methods are used, all relation data should be merged correctly
Actual Behavior
The eager entity is returnd without it nested entity that was manually requested.
During the query execution, TypeORM performs multiple joins to load the relations. When constructing the final object, the system overwrites the manually specified relation data with an eager-loaded version. This overwrite process results in a loss of detailed information for the manually specified nested relation, replacing it with a potentially incomplete representation that only includes eager-loaded fields.
Steps to reproduce
Create an entity with an eager relation that contains another nested relation and has DeleteDateColumn.
Perform a find query where you manually specify the eager relation and it's nested relation.
Execute the query and retrieve the result.
My Environment
Dependency
Version
Operating System
Windows
Node.js version
v20.10.0
Typescript version
5.3.3
TypeORM version
0.3.20
Additional Context
No response
Relevant Database Driver(s)
aurora-mysql
aurora-postgres
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
spanner
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
changed the title [-]Eager relations override manually requested relations with nested properties[/-][+]Eager relations with DeleteDateColumn override manually requested relations with nested properties[/+]on Jan 28, 2025
TypeORM has returned to active development after recently transitioning to new leadership (see related announcement).
As part of the new team's efforts to prioritise work on the project moving forward, it is necessary to clean up the backlog of stale issues.
🧹 This issue is being automatically closed because it has had no activity in the last 6 months.
If you believe this issue is still relevant, feel free to comment below and the maintainers may reopen it. Thank you for your contribution.
Activity
[-]Eager relations override manually requested relations with nested properties[/-][+]Eager relations with DeleteDateColumn override manually requested relations with nested properties[/+]fix: prevent eager-loaded entities with DeleteDateColumn from overwri…
github-actions commentedon Sep 17, 2025
TypeORM has returned to active development after recently transitioning to new leadership (see related announcement).
As part of the new team's efforts to prioritise work on the project moving forward, it is necessary to clean up the backlog of stale issues.
🧹 This issue is being automatically closed because it has had no activity in the last 6 months.
If you believe this issue is still relevant, feel free to comment below and the maintainers may reopen it. Thank you for your contribution.
LeviHeber commentedon Sep 17, 2025
Are there any updates? This is a patch that fixes several bugs at the same time, and it's worth moving forward with it.