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:
David Mehren 2020-09-22 17:32:35 +02:00
parent 74b03fc1fd
commit e97f9fe174
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
2 changed files with 12 additions and 11 deletions

View file

@ -52,7 +52,7 @@ export class Note {
revision => revision.note,
{ cascade: true },
)
revisions: Revision[];
revisions: Promise<Revision[]>;
@OneToMany(
_ => AuthorColor,
authorColor => authorColor.note,