#13069: Update on Primary Key performs Insert
-----------------------------------------+----------------------------------
 Reporter:  [email protected]         |       Owner:  nobody    
   Status:  new                          |   Milestone:            
Component:  Uncategorized                |     Version:  1.1       
 Keywords:  Primary Key, Update, Insert  |       Stage:  Unreviewed
Has_patch:  0                            |  
-----------------------------------------+----------------------------------
 When having a simple table with one column that is set to
 primary_key=True, changing its value in admin pages executes an insert
 instead of an update. According to the documentation:
 http://docs.djangoproject.com/en/dev/ref/models/instances/#how-django-
 knows-to-update-vs-insert I believe this behaviour is wrong.

 Reproduction Steps:
 1) Create simple model with one column primary_key=True (tested on
 charfield)
 2) Insert value in the admin page
 3) Attempt to change the value

 Expected Result:
 - New value replaces the old one

 Actual Result:
 - New row is added, the old value stays in the DB too

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13069>
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.

Reply via email to