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
findDescendants of TreeRepository using materialised-path design returns everything if parent was deleted before getting children or if we query with a non existing parent id.
In my case when deleting children of a parent that was already deleted I ended up deleting everything from the tree entity table(quite dangerous!).
Expected Behavior
findDescendants should return empty for a non existing parent.
Actual Behavior
findDescendants is returning all tree entity records from database if we query with a non existing parent id.
Steps to Reproduce
Save a tree entity parent on db.(e.g saved id is 1)
findDescendants({id: -1})(using a non existing id-1)
parent with id: 1 saved in step 1 is being returned
// insert code here
My Environment
NestJs.
Dependency
Version
Operating System
Node.js version
12.14.1
Typescript version
x.y.zzz
TypeORM version
0.2.41
Additional Context
Relevant Database Driver(s)
DB Type
Reproducible
aurora-data-api
no
aurora-data-api-pg
no
better-sqlite3
no
cockroachdb
no
cordova
no
expo
no
mongodb
no
mysql
yes
nativescript
no
oracle
no
postgres
yes
react-native
no
sap
no
sqlite
no
sqlite-abstract
no
sqljs
no
sqlserver
yes
Are you willing to resolve this issue by submitting a Pull Request?
✅ Yes, I have the time, and I know how to start.
✖️ Yes, I have the time, but I don't know how to start. I would need guidance.
✖️ No, I don’t have the time, but I can support (using donations) development.
✖️ No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.
The text was updated successfully, but these errors were encountered:
Hello Authors, Can you please point a resource for detailed implementation of materialised path in typeorm ???, the document is very short on this topic and doesn't cover the implementation in detail.
Issue Description
findDescendants of TreeRepository using materialised-path design returns everything if parent was deleted before getting children or if we query with a non existing parent id.
In my case when deleting children of a parent that was already deleted I ended up deleting everything from the tree entity table(quite dangerous!).
Expected Behavior
findDescendants should return empty for a non existing parent.
Actual Behavior
findDescendants is returning all tree entity records from database if we query with a non existing parent id.
Steps to Reproduce
// insert code here
My Environment
NestJs.
Additional Context
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: