-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add tree entities update and delete logic (#7156)
* feat: add tree entities update and delete logic Allows tree entities relations to be updated and deleted via the save function from the Repository Closes: #7155 * fix: fix linting errors * fix: revert development changes * fix: remove commented code * fix: remove LIMIT 1 to fix Oracle test * fix: fix mssql onDelete CASCADE for the closure juntion table * fix: add a await insert to the junction table query * feat: add closure junction cascade for all drives except mssql Mssql uses a conventional delete to manage the junction table Allow TreeParent onDelete CASCANDE on all drivers except mssql, mssql will throw an error saying that the feature is not supported. * fix: add try catch to getMetadata on createForeignKey in SqlServerQueryRunner * fix: fix entities path typo * fix: fix issue regarding relation in for tree entities * fix: make tree relation tests run in all drivers * fix: fix tests by setting relation tree entities in a new file * fix: enable re-adding a parent to an entity with a previous null parent * refactor: replace a try catch with a ternary operator
- Loading branch information
1 parent
44979af
commit 9c8a3fb
Showing
17 changed files
with
3,104 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export class NestedSetMultipleRootError extends Error { | ||
name = "NestedSetMultipleRootError"; | ||
|
||
constructor() { | ||
super(); | ||
Object.setPrototypeOf(this, NestedSetMultipleRootError.prototype); | ||
this.message = `Nested sets do not support multiple root entities.`; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.