class RelatedPopulator:
RelatedPopulator is used for select_related() object instantiation.
The idea is that each select_related() model will be populated by a different RelatedPopulator instance. The RelatedPopulator instances get klass_info and select (computed in SQLCompiler) plus the used db as input for initialization. That data is used to compute which columns to use, how to instantiate the model, and how to populate the links between the objects.
The actual creation of the objects is done in populate() method. This method gets row and from_obj as input and populates the select_related() model instance.
Method | __init__ |
Undocumented |
Method | populate |
Undocumented |
Instance Variable | cols_end |
Undocumented |
Instance Variable | cols_start |
Undocumented |
Instance Variable | db |
Undocumented |
Instance Variable | init_list |
Undocumented |
Instance Variable | local_setter |
Undocumented |
Instance Variable | model_cls |
Undocumented |
Instance Variable | pk_idx |
Undocumented |
Instance Variable | related_populators |
Undocumented |
Instance Variable | remote_setter |
Undocumented |
Instance Variable | reorder_for_init |
Undocumented |