diff options
author | AlTech98 <altech123159@gmail.com> | 2021-09-13 17:31:07 +0200 |
---|---|---|
committer | AlTech98 <altech123159@gmail.com> | 2021-09-13 17:31:07 +0200 |
commit | 072be4383ffcdf528481cdc4b0512062ff7c1e12 (patch) | |
tree | 617df12593d13bea8f67c2a8d1d6a279c2e2e112 /util/src | |
parent | :bug: fix In() query (diff) | |
download | server-072be4383ffcdf528481cdc4b0512062ff7c1e12.tar.xz |
Fix attachments not being saved to db
Diffstat (limited to 'util/src')
-rw-r--r-- | util/src/entities/Message.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/src/entities/Message.ts b/util/src/entities/Message.ts index f4c7fdc7..506db71a 100644 --- a/util/src/entities/Message.ts +++ b/util/src/entities/Message.ts @@ -128,7 +128,7 @@ export class Message extends BaseClass { sticker_items?: Sticker[]; @JoinColumn({ name: "attachment_ids" }) - @OneToMany(() => Attachment, (attachment: Attachment) => attachment.message) + @OneToMany(() => Attachment, (attachment: Attachment) => attachment.message, { cascade: true }) attachments?: Attachment[]; @Column({ type: "simple-json" }) |