Changes between Initial Version and Version 1 of Ticket #32965, comment 2
- Timestamp:
- Jul 27, 2021, 7:37:13 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #32965, comment 2
initial v1 2 2 > Thanks for this report, however IMO it's not a bug. It's [https://docs.djangoproject.com/en/3.2/topics/db/multi-db/#selecting-a-database-to-delete-from documented] that `DELETE` will be executed on the same database that was used to retrieve the object, so you need to use `using`. I would recommend to use related manager's methods i.e. `clear()` instead of chaining `all()` and `delete()`, e.g. `instance.mentor_binds.clear()`, and `set()` instead of `update()`, e.g. `instance.mentor_binds.set(...)`. 3 3 4 Oh. It try to delete/update on read database, but this is not a bug because it documented. Ok. This automatic database routers has too many issues to be used in real life. There was ~8000 lines in our project to start working with read replicas and it still doesn't work as expected. It looks like we should just disable this config and try aws serverless rds.4 Oh. It try to delete/update on read database, but this is not a bug because it documented. Ok. This automatic database routers has too many issues to be used in real life. There was ~8000 lines changed in our project to start working with read replicas and it still doesn't work as expected. It looks like we should just disable this config and try aws serverless rds.