Is there any way to get the old document BEFORE replace_one, update_one and delete_one? (support for find_one_and_replace, find_one_and_update and find_one_and_delete) #385
ssttkkl
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For example, I want to find one document and delete it and get the deleted document, in one operation (in other word, I want it atomtic).
With pymongo, I could do it by method
find_one_and_delete
. However, with beanie,await Document.find_one(...).delete_one()
just return me a DeleteResult containing deleted_count.Sorry for my poor English.
Beta Was this translation helpful? Give feedback.
All reactions