pydantic-mongo icon indicating copy to clipboard operation
pydantic-mongo copied to clipboard

Support transactions

Open siemova opened this issue 1 year ago • 1 comments

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.

siemova avatar Feb 17 '25 18:02 siemova

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.

jefersondaniel avatar Mar 19 '25 02:03 jefersondaniel