Skip to main content

Interface: SoftDeleteOptions

Defined in: src/decorators/SoftDelete.ts:6

Options for the @SoftDelete decorator.

Properties​

column?​

optional column?: string

Defined in: src/decorators/SoftDelete.ts:11

Override the database column name that stores the soft-delete timestamp.

Default​

'deleted_at'

cascade?​

optional cascade?: boolean

Defined in: src/decorators/SoftDelete.ts:23

When true, calling dbSet.remove(id) on a parent entity also cascades the soft-delete (sets deletedAt) to all @HasMany / @HasOne child relations. Likewise, dbSet.restore(id) restores children alongside the parent.

Child entities must also have @SoftDelete configured for the cascade to produce any effect on them.

Default​

false