#13528: db_table truncation is applied based on the properties of the default
database
-------------------------------------+-------------------------------------
     Reporter:  russellm             |                    Owner:
         Type:  Bug                  |  anubhav9042
    Component:  Database layer       |                   Status:  assigned
  (models, ORM)                      |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by anubhav9042):

 Replying to [comment:20 timo]:
 > I don't think the approach of the latest PR is good. Let's try
 implementing what Andrew suggested in comment 5 of this ticket.

 I tried to implement the above, I think that it is infeasible, atleast at
 the moment for the following reason:
 - There are many places for eg. as in query creation where `db_table` is
 used but there is no knowledge of `alias` or `connection` in order to call
 `get_db_table`. Even if try to increase the function parameters it would
 be very hacky to continue all the way up the function calls until an
 `alias` is found and pass it down all the way where it is needed.
 - In the backends there is no alias used so we don't know using the
 connection to call this function will be correct or not.
 - There are many places where still `connection` is used instead of
 `connections[alias]` so that might continue to create similar multi-db
 problems as the above.

 I discussed this issue a little with Loic and this is what he suggested
 that we can note down where and why it is possible to change the suggested
 behaviour and where all the alias is not used and should be so that we can
 move on from this and try to fix that bigger problem instead of this one
 and that might take considerable amount of time.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/13528#comment:22>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.b4655a3db127c65bbf23c45817e8c946%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to