mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
docs: update relations-faq (#9879)
Proposed a better safe-type workaround for circular dependencies.
This commit is contained in:
parent
f7b210bedb
commit
3f1142b5de
@ -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
|
||||
}
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user