summary refs log tree commit diff
path: root/util/src/entities/Role.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-20 20:22:56 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-20 20:22:56 +0200
commit62f9b35185bacfe5cc0bfcf34c485fc72bea9f10 (patch)
treee239a9a4f18c2d426a51ed2f7b570732857cd756 /util/src/entities/Role.ts
parent:sparkles: finish and fix .delete() for one-to-many relations (diff)
downloadserver-62f9b35185bacfe5cc0bfcf34c485fc72bea9f10.tar.xz
:bug: fix .delete -> add onDelete: "CASCADE"
Diffstat (limited to '')
-rw-r--r--util/src/entities/Role.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/src/entities/Role.ts b/util/src/entities/Role.ts

index 33c8d272..9fca99a5 100644 --- a/util/src/entities/Role.ts +++ b/util/src/entities/Role.ts
@@ -10,7 +10,9 @@ export class Role extends BaseClass { guild_id: string; @JoinColumn({ name: "guild_id" }) - @ManyToOne(() => Guild) + @ManyToOne(() => Guild, { + onDelete: "CASCADE", + }) guild: Guild; @Column()