From 576cbf5794b2e146892d7080b699882c2ba6ec6a Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Mon, 20 Sep 2021 20:22:56 +0200 Subject: :bug: fix .delete -> add onDelete: "CASCADE" --- util/src/entities/Session.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'util/src/entities/Session.ts') diff --git a/util/src/entities/Session.ts b/util/src/entities/Session.ts index d42a8f98..7cc325f5 100644 --- a/util/src/entities/Session.ts +++ b/util/src/entities/Session.ts @@ -11,7 +11,9 @@ export class Session extends BaseClass { user_id: string; @JoinColumn({ name: "user_id" }) - @ManyToOne(() => User) + @ManyToOne(() => User, { + onDelete: "CASCADE", + }) user: User; //TODO check, should be 32 char long hex string -- cgit 1.4.1