#12881: Unique constraint error with model inheritance while ModelForm should
not
validate
---------------------------------------------------+------------------------
Reporter: fgaudin | Owner: nobody
Status: new | Milestone: 1.2
Component: Database layer (models, ORM) | Version: 1.1
Resolution: | Keywords: unique
constraint, ModelForm, inheritance
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 1 |
---------------------------------------------------+------------------------
Changes (by kmtracey):
* needs_better_patch: 0 => 1
Comment:
Given the report in #13079 I think the approach in the patch here is
wrong. Unique constraints on a field are only being seen because all the
fields are pushed down to the child model. #13079 shows `unique_together`
specified on a parent is invisible to the child model, thus the logic that
gathers the unique checks in the first place needs to be changed. I think
it would better for that logic to keep track of the model that is the
source of the each unique constraint, rather than later on attempting to
figure out which model should be used for performing the check.
--
Ticket URL: <http://code.djangoproject.com/ticket/12881#comment:5>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.