I read in the Django documentation that in principle Django queries are lazy, that is the database is not queried until absolutely necessary.
Now, as a matter of efficiency, when I retreive data via
FooModel.object.filter(...)
and I have defined a relationship between FooModel and BarModel, is the info from BarModel automatically retreived as well? Or does this only happen when I later reference any of the BarModel fields?
On a related note. I have been looking for a simple way to somehow just confirm this for myself by looking at logs or using a debugger but have not been able to. I'd be interested in tips on how to do this.