1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-10 12:42:44 +01:00

Fix attachments not being saved to db

This commit is contained in:
AlTech98 2021-09-13 17:31:07 +02:00
parent 9429c5c09a
commit 072be4383f

View File

@ -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" })