From 3f1142b5deeed49d2755ca9bf86eef3b4a829716 Mon Sep 17 00:00:00 2001 From: Ihor Levchenko Date: Wed, 5 Apr 2023 13:46:58 +0300 Subject: [PATCH] docs: update relations-faq (#9879) Proposed a better safe-type workaround for circular dependencies. --- docs/relations-faq.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/relations-faq.md b/docs/relations-faq.md index d888b6834..1331985e2 100644 --- a/docs/relations-faq.md +++ b/docs/relations-faq.md @@ -285,7 +285,7 @@ export class ActionLog { @Column() action: string - @ManyToMany("Person", "id") + @ManyToMany("Person", (person: Person) => person.id) person: Person } ``` @@ -299,7 +299,7 @@ export class Person { @PrimaryColumn() id: number - @ManyToMany("ActionLog", "id") + @ManyToMany("ActionLog", (actionLog: ActionLog) => actionLog.id) log: ActionLog } ```