0

I'm aware that we can manage db transaction to maintain transaction.atomic(), it works really well with SQL, just wanted to understand if I use mongoengine as ODM then will it work or if not what option do I have to maintain atomicity?

Any help will be useful

Magnotta
  • 933
  • 11
  • 34

1 Answers1

0

django's atomic feature only applies to django's ORM which applies to sql databases. MongoEngine currently has no support for transactions and to my knowledge no python ORM currently supports them.

If atomicity is a hard requirement and you need to use mongoDB, I guess you need to go with the underlying driver pymongo

bagerard
  • 5,681
  • 3
  • 24
  • 48