django1/django/db
Russell Keith-Magee 9595183d03 Fixed #13724: Corrected routing of write queries involving managers.
Previously, if a database request spanned a related object manager, the
first manager encountered would cause a request to the router, and this
would bind all subsequent queries to the same database returned by the
router. Unfortunately, the first router query would be performed using
a read request to the router, resulting in bad routing information being
used if the subsequent query was actually a write.

This change defers the call to the router until the final query is acutally
made.

It includes a small *BACKWARDS INCOMPATIBILITY* on an edge case - see the
release notes for details.

Thanks to Paul Collins (@paulcollinsiii) for the excellent debugging
work and patch.
2013-09-30 13:05:43 +08:00
..
backends Enforce ordering on PostgreSQL get_constraints cols (refs #21134) 2013-09-26 14:55:19 +01:00
migrations Add reverse_code optional argument to RunPython 2013-09-25 17:21:20 +01:00
models Fixed #13724: Corrected routing of write queries involving managers. 2013-09-30 13:05:43 +08:00
__init__.py A large number of stylistic cleanups across django/db/ 2013-07-08 10:39:54 +10:00
transaction.py Tested exc_type instead of exc_value in __exit__. 2013-09-04 16:19:04 -05:00
utils.py Fixed #21109 -- made db cursor error wrapping faster 2013-09-17 12:18:55 +03:00