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
mpath is not updated correctly if parentId was soft deleted. Query is unable to "find" parentId even though its path is required to update children's path
Expected Behavior
If Parent "1" has children "2" and "3" (mpaths 1.2 and 1.3), but then Parent "1" is soft deleted and these children are now updated to have parentId = "4" (mpaths 4.2 and 4.3 respectively), their mpath should update correctly from 1.2 and 1.3 to 4.2 and 4.3.
Actual Behavior
Since Parent "1" was soft deleted, the queryBuilder that fetches the mpath from the parent is unable to find it, hence, it is unable to update the childrens' mpath accordingly, leading to a missmatch in the mpath column and the real path
Steps to reproduce
Test scenario will be provided within pull request to solve issue
My Environment
Dependency
Version
Operating System
Node.js version
18.19.0
Typescript version
x.y.zzz
TypeORM version
x.y.zzz
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?
Yes, I have the time, and I know how to start.
The text was updated successfully, but these errors were encountered:
…pository
Include soft-deleted entities in queryBuilder to fetch required parent's path
even if parent is soft deleted. This path is required to perforn the corresponding
update of the childs' mpath
fixtypeorm#10843
Issue description
mpath is not updated correctly if parentId was soft deleted. Query is unable to "find" parentId even though its path is required to update children's path
Expected Behavior
If Parent "1" has children "2" and "3" (mpaths 1.2 and 1.3), but then Parent "1" is soft deleted and these children are now updated to have parentId = "4" (mpaths 4.2 and 4.3 respectively), their mpath should update correctly from 1.2 and 1.3 to 4.2 and 4.3.
Actual Behavior
Since Parent "1" was soft deleted, the queryBuilder that fetches the mpath from the parent is unable to find it, hence, it is unable to update the childrens' mpath accordingly, leading to a missmatch in the
mpath
column and the real pathSteps to reproduce
Test scenario will be provided within pull request to solve issue
My Environment
Additional Context
No response
Relevant Database Driver(s)
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, and I know how to start.
The text was updated successfully, but these errors were encountered: