Changes between Initial Version and Version 1 of Ticket #28939, comment 1
- Timestamp:
- Dec 18, 2017, 1:16:48 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28939, comment 1
initial v1 19 19 It would change the behaviour of `Foo.objects.using('default').prefetch_related('bars')` because `using()` has usually precedence over the routers suggestion. We could special case prefetches to only default to the base queryset's `using` if no router provide a `db_for_read` suggestion but that would be counter intuitive IMO and add even more complexity to the read database alias selection logic. 20 20 21 So, I think that 1. is favourable but would require a deprecation cycle for the case where both a base query alias is forced though `using` and that `db_for_read` suggests a database. In the mean time I think that 3. is easier to implement and could be useful even in a future where 1. would getfixed.21 So, I think that 1. is favourable but would require a deprecation cycle for the case where both a base query alias is forced though `using` and that `db_for_read` suggests a database. In the mean time I think that 3. is easier to implement and could be useful even in a future where 1. is fixed.