$softDeleteMany

Mark multiple records as deleted without permanently removing them from the table. The $softDeleteMany method updates the deletion status of all records matching the provided conditions, typically by setting a deletedAt timestamp or a deleted flag. This allows the records to remain in the database for potential restoration, while excluding them from active queries by default. Ideal for batch soft deletion operations.

Query
Parameter's

$where

<StaticProps>

$options

<FindOptions>

await Member.$softDelete({
    $where: {
        userId: {
            $startsWith: '123'
        }
    },
    $options: {
        $limit: 1
    }
});

Last updated