#2259: PK Change creates new object instead of update
---------------------------------------------+------------------------------
Reporter: [EMAIL PROTECTED] | Owner: nobody
Status: reopened | Milestone: 1.0 alpha
Component: Database wrapper | Version:
Resolution: | Keywords:
Stage: Design decision needed | Has_patch: 0
Needs_docs: 1 | Needs_tests: 0
Needs_better_patch: 1 |
---------------------------------------------+------------------------------
Changes (by sime):
* cc: sime, russellm (added)
* needs_better_patch: 0 => 1
* needs_docs: 0 => 1
* milestone: => 1.0 alpha
Comment:
This issue has popped up on too many projects now, usually in the context
of admin.
Either we allow custom PK value changes or not.
I propose we do, right from the ORM level up; and UPDATE instead of INSERT
if an _original_pk was present but is different from the new PK at time of
saving. Problem solved, and Django can then claim full support of custom
single-field primary keys.
If not, then I guess that's acceptable too; but at the very least it needs
to be made clear in the documentation, and enforced in newforms-admin.
--
Ticket URL: <http://code.djangoproject.com/ticket/2259#comment:12>
Django Code <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
-~----------~----~----~----~------~----~------~--~---