mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-10-22 15:12:08 -04:00
docs(history-entry): document why we can't lazy-load
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
8eabfbc0a5
commit
8aae5cb574
1 changed files with 7 additions and 0 deletions
|
@ -10,6 +10,13 @@ import { User } from '../users/user.entity';
|
||||||
|
|
||||||
@Entity()
|
@Entity()
|
||||||
export class HistoryEntry {
|
export class HistoryEntry {
|
||||||
|
/**
|
||||||
|
* The `user` and `note` properties cannot be converted to promises
|
||||||
|
* (to lazy-load them), as TypeORM gets confused about lazy composite
|
||||||
|
* primary keys.
|
||||||
|
* See https://github.com/typeorm/typeorm/issues/6908
|
||||||
|
*/
|
||||||
|
|
||||||
@ManyToOne((_) => User, (user) => user.historyEntries, {
|
@ManyToOne((_) => User, (user) => user.historyEntries, {
|
||||||
onDelete: 'CASCADE',
|
onDelete: 'CASCADE',
|
||||||
primary: true,
|
primary: true,
|
||||||
|
|
Loading…
Reference in a new issue