ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
Closure table is a tree hierarchy structure that allows for multiple parents. However, TypeORM's current structure only allows for a single parent. Missing this closure-table feature makes this approach lose one of its main benefits.
The Solution
A new decorator should be introduced for tree structures like closure-table, to avoid confusion with single-parent approaches. Else, the current TreeParent should be changed to support arrays. I understand that this might also include more changes in the ways tree structures are currently handled.
Considered Alternatives
I do not think that there is any other way of dealing with this right now, other than using subscribers/listeners and custom logic.
Additional Context
No response
Relevant Database Driver(s)
[ ] aurora-mysql
[ ] aurora-postgres
[ ] better-sqlite3
[ ] cockroachdb
[ ] cordova
[ ] expo
[ ] mongodb
[ ] mysql
[ ] nativescript
[ ] oracle
[X] postgres
[ ] react-native
[ ] sap
[ ] spanner
[ ] sqlite
[ ] sqlite-abstract
[ ] sqljs
[ ] sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
Feature Description
Closure table is a tree hierarchy structure that allows for multiple parents. However, TypeORM's current structure only allows for a single parent. Missing this closure-table feature makes this approach lose one of its main benefits.
The Solution
A new decorator should be introduced for tree structures like closure-table, to avoid confusion with single-parent approaches. Else, the current
TreeParent
should be changed to support arrays. I understand that this might also include more changes in the ways tree structures are currently handled.Considered Alternatives
I do not think that there is any other way of dealing with this right now, other than using subscribers/listeners and custom logic.
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.