write queries on related managers use the db_for_read database
|Reported by:||tobias||Owned by:||slafs|
|Component:||Database layer (models, ORM)||Version:||1.3|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
If you execute a write query (update() or delete()) on a queryset obtained from a related manager, it appears to use the db_for_read database instead of the db_for_write database for that query.
The attached patch reproduces the issue on trunk. It also exists in 1.3.1.
Change History (11)
Changed 4 years ago by tobias
comment:1 Changed 4 years ago by tobias
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:4 Changed 2 years ago by slafs
- Owner changed from nobody to slafs
- Status changed from new to assigned