With this models :
class Editor(models.Model):
name = models.CharField(maxlength=255)
class Book(models.Model):
editor = models.ForeignKey(Editor)
title = models.CharField(maxlength=255)
We can do :
Book.objects.all().values('title')
But we can't access the editor's name, even with select_related().
values() allow short queries to spare DB, and badly we can't use that
feature if we need a value of a bound model...
What would you think about this ?
Book.objects.select_related().values('title', 'editor__name')
We even could remove the select_related() if values() managed the
relationship between models...
Regards,
Baptiste