id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 16732 Unable to have abstract model with unique_together Mitar Can Sarıgöl "I have such model definition: {{{ class SlugVersion(models.Model): class Meta: abstract = True unique_together = (('slug', 'version'),) slug = models.CharField(db_index=True, max_length=10, editable=False) version = models.IntegerField(db_index=True, editable=False) class Base(SlugVersion): name = models.CharField(max_length=10) class Test(Base): test = models.IntegerField() }}} And I am getting: {{{ Error: One or more models did not validate: test.test: ""unique_together"" refers to slug. This is not in the same model as the unique_together statement. test.test: ""unique_together"" refers to version. This is not in the same model as the unique_together statement. }}} I see this is as a bug. Why there could not be a table for class `Base` with unique constraints on its `slug` and `version` fields, and then 1-1 relationship with additional table for model `Test` with field `test`." Bug assigned Database layer (models, ORM) dev Normal mmitar@… Giacomo Graziosi direx Accepted 1 0 1 0 0 0