Skip to content

E-Commerce API - Issue with deprecation remove to deleteOne instead #83

@aradradev

Description

@aradradev

Prerequisites

  • [x ] I have written a descriptive issue title

Mongoose version
^8.5.3

Node.js version
20.x

Operating system
Linux

Operating system version (i.e. 24.04, 11.3, 10)
Linux 6.8.7-arch1-

Issue
I am currently in the E-commerce API module, and specifically in the remove all reviews and Aggregation pipeline setup. The current version I am using, remove() is deprecated. And this is How I dealt with remove all reviews:

remove all reviews:
Product js
productController js (1)

Aggregation pipeline in order to trigger the remove hook with deleteOne:
reviewController js
Review js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions