summary refs log tree commit diff
path: root/util/src/entities/Session.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-20 21:49:42 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-20 21:49:42 +0200
commit5cec6e43d4e193616458a7e9c74a486ceade7e93 (patch)
treed0728474d103bcd6743e365828b342b750902c33 /util/src/entities/Session.ts
parent:sparkles: route middleware test option (diff)
parent:bug: fix relationships (diff)
downloadserver-5cec6e43d4e193616458a7e9c74a486ceade7e93.tar.xz
Merge branch 'master' into unittests
Diffstat (limited to 'util/src/entities/Session.ts')
-rw-r--r--util/src/entities/Session.ts4
1 files changed, 3 insertions, 1 deletions
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