docs: update relations-faq (#9879)

Proposed a better safe-type workaround for circular dependencies.
This commit is contained in:
Ihor Levchenko 2023-04-05 13:46:58 +03:00 committed by GitHub
parent f7b210bedb
commit 3f1142b5de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}
```