Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Added field to test model to cause failure on PostgreSQL

Create a test that illustrates #12728.

This is a bug that manifests when there's a generic relation to
a model that uses multi-table inheritence, with PostgreSQL as the
  • Loading branch information...
commit 41c0a33bdabd567159da96626a6e5373691cacca 1 parent 0f69a16
@lorin lorin authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 tests/regressiontests/backends/
6 tests/regressiontests/backends/
@@ -1,3 +1,4 @@
+from django.contrib.comments.models import Comment
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import models, connection
@@ -44,10 +45,15 @@ class Tag(models.Model):
content_object = generic.GenericForeignKey('content_type', 'object_id')
+class PossibleSelfComment(Comment):
+ by_author = models.BooleanField(default=False)
class Post(models.Model):
name = models.CharField(max_length=30)
text = models.TextField()
tags = generic.GenericRelation('Tag')
+ comments = generic.GenericRelation('PossibleSelfComment')
class Meta:
db_table = 'CaseSensitive_Post'

0 comments on commit 41c0a33

Please sign in to comment.
Something went wrong with that request. Please try again.