I've just attached an updated patch:

http://code.djangoproject.com/attachment/ticket/3182/3182.2.diff

Before I committed this I wanted to ask the list their thoughts of
Model.update() doing a save(force_update=True).  Currently the patch
is just calling save(), which allows one to call update() on an
unsaved model instance.  However, I think the more common scenario
would be updating an object just fetched from the database, in which
case a force_update=True would be ideal.

Also, QuerySet.update_or_create() calls Model.update() if the object
already exists, and in this case force_update=True should also be
used.

Another option would be to allow Model.update() to take the
force_update and force_insert parameters that save() does and just
pass these through to the save() call.

What do you think?

Gary

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to