mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 17:55:17 -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
74b03fc1fd
commit
e97f9fe174
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