mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 02:35:23 -04:00
NoteEntity: Lazy-load revisions
relation
Using a `Promise` type in a TypeORM entity automatically enables lazy-loading of that relation. See https://typeorm.io/#/eager-and-lazy-relations/lazy-relations Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
b1cb8025a5
commit
21f4cda27c
2 changed files with 12 additions and 11 deletions
|
@ -52,7 +52,7 @@ export class Note {
|
|||
revision => revision.note,
|
||||
{ cascade: true },
|
||||
)
|
||||
revisions: Revision[];
|
||||
revisions: Promise<Revision[]>;
|
||||
@OneToMany(
|
||||
_ => AuthorColor,
|
||||
authorColor => authorColor.note,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue