pydantic-mongo
pydantic-mongo copied to clipboard
Support transactions
Please support transactions for atomic operations, as described here.
Ideally, Pydantic Mongo would expose the ability to start, commit, and/or rollback a transaction session. But, if not, at least enabling us to pass our own session object to repository methods should suffice.
I guess adding a session kwarg to the repository methods and passing it to the pymongo calls would work. What do you think?
I don't have time for doing it in the short term, but I will look into it when I have some time.