Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select_related and no field.rel.to #30

Open
francescortiz opened this issue Jan 29, 2014 · 1 comment
Open

select_related and no field.rel.to #30

francescortiz opened this issue Jan 29, 2014 · 1 comment

Comments

@francescortiz
Copy link
Contributor

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!

@simone
Copy link
Owner

simone commented Oct 5, 2014

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants