From 774c8213f26ba18f21e2f43528ad1c56b5a94613 Mon Sep 17 00:00:00 2001 From: naskya Date: Thu, 16 May 2024 17:26:31 +0900 Subject: [PATCH] fix (backend): correct relation --- .../backend/src/models/entities/scheduled-note-creation.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/models/entities/scheduled-note-creation.ts b/packages/backend/src/models/entities/scheduled-note-creation.ts index 43b9a8312d..ae2cfbdfac 100644 --- a/packages/backend/src/models/entities/scheduled-note-creation.ts +++ b/packages/backend/src/models/entities/scheduled-note-creation.ts @@ -3,6 +3,7 @@ import { JoinColumn, Column, ManyToOne, + OneToOne, PrimaryColumn, Index, type Relation, @@ -31,7 +32,7 @@ export class ScheduledNoteCreation { public scheduledAt: Date; //#region Relations - @ManyToOne(() => Note, { + @OneToOne(() => Note, { onDelete: "CASCADE", }) @JoinColumn()