Changes between Initial Version and Version 1 of Ticket #28939, comment 1


Ignore:
Timestamp:
Dec 18, 2017, 1:16:48 PM (7 years ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28939, comment 1

    initial v1  
    1919It 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.
    2020
    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 get fixed.
     21So, 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.
Back to Top