concrete type does not inherit `unique_together` of parent
jianli opened this issue · 2 comments
If unique_together
is defined in Animal
's Meta
inner class, it should (but does not) propagate to Canine
, since Canine
(being of the same backend database table) is in fact subject to that constraint as well.
According to the "Meta inheritance" docs, that is currently how Meta inheritance works in the case of abstract classes.
Actually Animal
is not an abstract model, it’s only a model that cannot be instantiated directly – you must choose one of the subclasses, which are implemented as proxy models. Django’s documentation says that “Proxy models inherit any Meta options that they don’t define from their non-abstract model parent (the model they are proxying for)”. If unique_together
is not inherited, it probably should be considered a bug in django-typed-models.
@KrzysiekJ's assessment sounds about right