title: Using annotate or extra to add field of foreignkey to queryset ? (equivalent of SQL "AS" ?)
body: <p>I have merged two querysets (qs1 and qs2) which individually work fine, as follows: </p>
  
  <pre><code>qlist = [qs1, qs2]
  results = list(chain(qs1, qs2))
  </code></pre>
  
  <p>So far, so good - the above works. But now I'm trying to order the results using the following: </p>
  
  <pre><code>qlist = [qs1, qs2]
  results = sorted(chain(qs1, qs2), key=attrgetter('monthly_fee'))
  </code></pre>
  
  <p>The problem is that the second queryset (qs2) refers to the monthly_fee through a ForeignKey; whereas qs1 has 'monthly_fee' available. Here is qs2: </p>
  
  <pre><code>qs2 = Offer.objects.select_related('subscription') 
  qs2 = qs2.order_by(subscription__monthly_fee) 
  </code></pre>
  
  <p>And the simplified models: </p>
  
  <pre><code>class Subscription(models.Model): 
      monthly_fee = models.IntegerField(null=False, blank=True, default=0) 
      name = models.CharField(max_length=120, null=True, blank=True)
  
  class Offer(models.Model): 
      promotion_name = models.CharField(max_length=120, null=True, blank=True)
      subscription = models.ForeignKey(Subscription)
      discount = models.IntegerField(null=False, blank=True, default=0) 
  </code></pre>
  
  <p>I've tried using .annotate() and .extra() to rename the <code>subscription__monthly_fee</code> in the query qs2 as follows: </p>
  
  <pre><code>qs2 = Offer.objects.select_related('subscription').annotate(monthly_fee=subscription__monthly_fee)
  </code></pre>
  
  <p>But then get the error</p>
  
  <blockquote>
    <p>global name 'subscription__monthly_fee' is not defined</p>
  </blockquote>
  
  <p>I am at the point of just hacking this by over-riding the .save() methods of my models to manually add the monthly_fee to each Offer instance whenever an object is created. But just wanted to check whether there isn't a better way ? </p>
  
  <p>Thank you, </p>
  
  <p>Michael</p>