select_related and no field.rel.to
Opened this issue · 1 comments
Hi,
How do you tell django that you have a select_related query? I am enforced to disable select_related queries with an "if False and ..." hack because django does not populate the columns of the select_related tables. The reason for select_related queries not being populated is that when django receives the list of fields that must fill the sql query, the composite foreignkey fields are not there anymore because they have no db_column so there is no field.rel.to to populate the related query.
I tried giving a pseudo "field.rel" to any of the actual fields that compose the composite key but I don't have enought django knowledge to understand what's going on there yet.
If you have any clue on where to start looking I will make further research.
Thank you!
I'd like help you but I need more information.
Can you post some line of code in order to create a not regression bug for support select_related as well?