summary refs log tree commit diff
path: root/util/src/entities/Relationship.ts
diff options
context:
space:
mode:
Diffstat (limited to 'util/src/entities/Relationship.ts')
-rw-r--r--util/src/entities/Relationship.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/src/entities/Relationship.ts b/util/src/entities/Relationship.ts
index bd5861f0..3e1280c7 100644
--- a/util/src/entities/Relationship.ts
+++ b/util/src/entities/Relationship.ts
@@ -1,4 +1,4 @@
-import { Column, Entity, JoinColumn, ManyToOne, OneToMany } from "typeorm";
+import { Column, Entity, JoinColumn, ManyToOne, OneToMany, RelationId } from "typeorm";
 import { BaseClass } from "./BaseClass";
 import { User } from "./User";
 
@@ -11,7 +11,7 @@ export enum RelationshipType {
 
 @Entity("relationships")
 export class Relationship extends BaseClass {
-	@Column()
+	@RelationId((relationship: Relationship) => relationship.user)
 	user_id: string;
 
 	@JoinColumn({ name: "user_id" })