Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concrete type does not inherit unique_together of parent #15

Open
jianli opened this issue May 6, 2014 · 2 comments
Open

concrete type does not inherit unique_together of parent #15

jianli opened this issue May 6, 2014 · 2 comments

Comments

@jianli
Copy link

jianli commented May 6, 2014

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.

@KrzysiekJ
Copy link
Contributor

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.

@craigds
Copy link
Owner

craigds commented May 13, 2014

@KrzysiekJ's assessment sounds about right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants