Opened 11 years ago
Last modified 6 years ago
#23268 assigned Bug
Fixtures: Natural Key support for Generic Foreign Keys
Reported by: | Anshuman Aggarwal | Owned by: | Guillaume Thomas |
---|---|---|---|
Component: | Core (Serialization) | Version: | 1.6 |
Severity: | Normal | Keywords: | natural generic fixtures |
Cc: | dev@…, Ian Foote | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Pull Requests: | |||
Description ¶
Currently, the natural key support is incomplete when it comes to generic foreign keys (I say bug, you may think feature). One cannot remove PKs from any object that has a generic foreign key reference limiting the whole idea of having natural keys to direct foreign keys only. Since generic foreign keys can inherently have an entry with any model, PKs have to be dumped for all models necessitating the maintenance of updated PKs
There is a great answer by someone who has done the leg work for figuring out what is required.
http://stackoverflow.com/questions/11159377/is-it-possible-to-use-a-natural-key-for-a-genericforeignkey-in-django
Creating a ticket to document it here and see what the interest is for the same.
According to the ticket's flags, the next step(s) to move this issue forward are:
- To improve the patch as described in the pull request review comments or on this ticket, then uncheck "Patch needs improvement".
If creating a new pull request, include a link to the pull request in the ticket comment when making that update. The usual format is:
[https://github.com/django/django/pull/#### PR]
.
Change History (7)
comment:1 by , 10 years ago
Cc: | added |
---|
comment:2 by , 10 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 8 years ago
Has patch: | set |
---|---|
Triage Stage: | Accepted → Ready for checkin |
comment:5 by , 8 years ago
Triage Stage: | Ready for checkin → Accepted |
---|
"Ready for checkin" is set by a patch reviewer, not the patch author.
comment:6 by , 8 years ago
Patch needs improvement: | set |
---|
As I mentioned on the pull request, it doesn't seem like a good separation of concerns to modify the "core" serializers for a "contrib" field. Unfortunately, I haven't studied the problem enough to suggest an alternate solution.
comment:7 by , 6 years ago
Cc: | added |
---|
PR