diff --git a/src/history/history-entry.entity.ts b/src/history/history-entry.entity.ts index a2817e393..1bd1386b7 100644 --- a/src/history/history-entry.entity.ts +++ b/src/history/history-entry.entity.ts @@ -23,13 +23,13 @@ export class HistoryEntry { @ManyToOne((_) => User, (user) => user.historyEntries, { onDelete: 'CASCADE', - orphanedRowAction: 'delete', // This ensures the whole row is deleted when the Entry stops being referenced + orphanedRowAction: 'delete', // This ensures the row of the history entry is deleted when no user references it anymore }) user: Promise; @ManyToOne((_) => Note, (note) => note.historyEntries, { onDelete: 'CASCADE', - orphanedRowAction: 'delete', // This ensures the whole row is deleted when the Entry stops being referenced + orphanedRowAction: 'delete', // This ensures the row of the history entry is deleted when no note references it anymore }) note: Promise; diff --git a/src/permissions/note-group-permission.entity.ts b/src/permissions/note-group-permission.entity.ts index 08aef95a5..96cd6097a 100644 --- a/src/permissions/note-group-permission.entity.ts +++ b/src/permissions/note-group-permission.entity.ts @@ -22,13 +22,13 @@ export class NoteGroupPermission { @ManyToOne((_) => Group, { onDelete: 'CASCADE', // This deletes the NoteGroupPermission, when the associated Group is deleted - orphanedRowAction: 'delete', // This ensures the whole row is deleted when the Permission stops being referenced + orphanedRowAction: 'delete', // This ensures the row of the NoteGroupPermission is deleted when no group references it anymore }) group: Promise; @ManyToOne((_) => Note, (note) => note.groupPermissions, { onDelete: 'CASCADE', // This deletes the NoteGroupPermission, when the associated Note is deleted - orphanedRowAction: 'delete', // This ensures the whole row is deleted when the Permission stops being referenced + orphanedRowAction: 'delete', // This ensures the row of the NoteGroupPermission is deleted when no note references it anymore }) note: Promise; diff --git a/src/permissions/note-user-permission.entity.ts b/src/permissions/note-user-permission.entity.ts index 1dd206205..30a65515e 100644 --- a/src/permissions/note-user-permission.entity.ts +++ b/src/permissions/note-user-permission.entity.ts @@ -22,13 +22,13 @@ export class NoteUserPermission { @ManyToOne((_) => User, { onDelete: 'CASCADE', // This deletes the NoteUserPermission, when the associated Note is deleted - orphanedRowAction: 'delete', // This ensures the whole row is deleted when the Permission stops being referenced + orphanedRowAction: 'delete', // This ensures the row of the NoteUserPermission is deleted when no user references it anymore }) user: Promise; @ManyToOne((_) => Note, (note) => note.userPermissions, { onDelete: 'CASCADE', // This deletes the NoteUserPermission, when the associated Note is deleted - orphanedRowAction: 'delete', // This ensures the whole row is deleted when the Permission stops being referenced + orphanedRowAction: 'delete', // This ensures the row of the NoteUserPermission is deleted when no note references it anymore }) note: Promise;