summary refs log tree commit diff
path: root/util/src/entities/Member.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-30 12:15:06 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-30 12:15:06 +0200
commit4abc758991d3f92a6404f269770fb92f5375d1e4 (patch)
tree925932613c1632e82d74202ef32277ae3e8e94c5 /util/src/entities/Member.ts
parent:zap: only local rate limit to prevent to much pressure on the database (diff)
downloadserver-4abc758991d3f92a6404f269770fb92f5375d1e4.tar.xz
:construction: typeorm
Diffstat (limited to 'util/src/entities/Member.ts')
-rw-r--r--util/src/entities/Member.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/src/entities/Member.ts b/util/src/entities/Member.ts
index 5b588d70..c5d289ef 100644
--- a/util/src/entities/Member.ts
+++ b/util/src/entities/Member.ts
@@ -1,6 +1,6 @@
 import { PublicUser, User } from "./User";
 import { BaseClass } from "./BaseClass";
-import { Column, Entity, JoinColumn, ManyToMany, ManyToOne, RelationId } from "typeorm";
+import { Column, Entity, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany, RelationId } from "typeorm";
 import { Guild } from "./Guild";
 import { Config, emitEvent } from "../util";
 import {
@@ -26,7 +26,7 @@ export class Member extends BaseClass {
 	guild_id: string;
 
 	@JoinColumn({ name: "guild_id" })
-	@ManyToOne(() => Guild, (guild: Guild) => guild.id)
+	@ManyToOne(() => Guild, (guild: Guild) => guild.members)
 	guild: Guild;
 
 	@Column({ nullable: true })
@@ -35,7 +35,7 @@ export class Member extends BaseClass {
 	@RelationId((member: Member) => member.roles)
 	role_ids: string[];
 
-	@JoinColumn({ name: "role_ids" })
+	@JoinTable()
 	@ManyToMany(() => Role)
 	roles: Role[];