Skip to content

Conversation

@jagadish-555
Copy link

Summary

This PR fixes issue #15858, where Model.prototype.deleteOne() was not setting the $isDeleted property to true on the document instance after a successful deletion.

This behavior contradicted the documentation, which states that calling deleteOne() should set $isDeleted to true when the operation succeeds.

Examples

const doc = await Model.create({ name: 'test' });
await doc.deleteOne();

console.log(doc.$isDeleted()); // Now prints 'true' (used to be 'false')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant