NoteEntity: Enable CASCADE for revision column

This makes creating new Notes easier, as the first Revision is automatically created in the database.

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2020-09-19 15:57:34 +02:00
parent 2c3a75187e
commit 4ff60b162e
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -57,6 +57,7 @@ export class Note {
@OneToMany(
_ => Revision,
revision => revision.note,
{ cascade: true },
)
revisions: Revision[];