On Friday 01 March 2013, Aymeric Augustin wrote: > Hello, > > I'd like to improve transactions handling in Django. The first step is [to > replace -- assumed, SB] the current emulation of autocommit with > database-level autocommit. >
There is an issue you seem to be ignoring: An "ORM Write" is, in many cases, more than a single query against the backend. The most obvious example is models with inheritance -- trying to do these with database-level autocommit means that the code writes the two parts in separate transactions. I'm very -1 on this. There are two alternatives I see -- one is to make sure that an ORM Write is still a transaction (not database-level autocommit); the other is to explicitly commit-unless-managed (or something equivalent) after every read and raw-sql, as well as write. BTW, how do you treat select-for-update, which currently makes sense in "faked autocommit" mode, but will stop making sense with the suggested change? Shai. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
