Skip to content

select_related and no field.rel.to #30

@francescortiz

Description

@francescortiz

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions