H
H
hobu4ok912017-06-20 05:33:12
Django
hobu4ok91, 2017-06-20 05:33:12

Does Django have greedy and lazy loading of data from the database?

After reading the documentation, I did not find how to manipulate with the help of orm the receipt of data in one request. For example, I need to get all the model data at once with all related models. For example, in the yii2 framework, this is done through the with() method of the active query object. Is there something similar in Django? What is the default loading in Django - lazy or greedy?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kolabis, 2022-02-25
@kolabis

Yes, I have. select_related add and there will be a greedy query.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question