Re: Left outer join rather than subquery.

2018-11-02 Thread Dan Davis
I'm going to answer myself in case anyone else looks for an answer to this. In Django<2.x, the Subquery method I'm using is the best available. In Django>=2, I can use the FilteredRelation with my annotation instead: https://docs.djangoproject.com/en/2.1/ref/models/querysets/#django.db.models.

Left outer join rather than subquery.

2018-10-30 Thread Dan Davis
Suppose you have a setup like this: class Journal(models.Model): title = models.CharField(max_length=200) issn_type_choices = ( ('E', 'Electronic'), ('P', 'Print'), } class Issn(models.Model): ELECTRONIC='E' PRINT='P'