Automattic / Automattic/mongoose

save after delete???

Open
#3,227 1 comment 0 reactions 0 assignees View on GitHub
backwards-breaking enhancement plugin
Dominant language
JavaScript
Stars
27.5k
Forks
4k
Avg merge
2d 7h
Merged PRs (30d)
35

Description

1.I got a document (A) by id(XXX)
2.I remove document by id(XXX)
3.I make a change to A
4.I save A

the phenomenon is that:
1. the document is removed eventually.(I am satisfied with this result)
2.after I save a, it won't make a mistake, I got the 'err' to be 'null' (I am not agree with this result)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the documented sequence: retrieve a document by id, remove it by id, modify the retrieved document, and save it. Check the save callback's err value and confirm the intended behavior for saving after deletion; the issue is done when that behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb
Domain
backend, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.