I'm new in using GenericForeignKey, and I couldn't make it to work in a query statement. The tables are roughly like the following: class Ticket(models.Model): issue_ct = models.ForeignKey(ContentType, related_name='issue_content_type') issue_id = models.PositiveIntegerField(null=True, blank=True) issue = generic.GenericForeignKey('issue_ct', 'issue_id') class Issue(models.Model): scan = models.ForeignKey(Scan) A scan creates one issue, an issue generates some tickets, and I made Issue as a foreign key to Ticket table. Now I have a Scan object, and I want to query for all the tickets that