How to make \"manual\" select_related imitation to avoid undesirable DB hits?
we have:
class Country:
name = CharField()
class City:
country
I'm not sure if you can do this. As an alternative, you can select individual fields from the country table and access them on each instance.
cities = City.objects.raw("select city.*, name as country_name from city inner join country on city.country_id = country.id where name = 'london'")
city = cities[0]
# this will not hit the database again
city.country_name