Hi Jeroen,

On 11/20/2014 02:43 AM, Jeroen Pulles wrote:
> I'm still wondering what's best for save_table to do. Pre-1.6 Django
> code would end up with a new object in my situation, and no complaints.
> Apparently, that worked, for me. I'm inclined to think that is still
> what I want for the update-y variants of save().

I hear you -- but I already explained why I think the current behavior
(in 1.6 and 1.7) is better. I don't find "but apparently [the old
behavior] worked, for me" a convincing counter-argument :)

If we were still in the 1.6 release cycle, then "it's a regression from
1.5" alone might have been a reason to change, but now that we've had
two full releases with the new behavior, that's no longer the case.

> Or maybe I should consider using manager.update.

If you want an update that doesn't mind if nothing is updated, then a
QuerySet update is what you want, yes.

(It's ok for QuerySet.update() to update nothing if nothing matches,
unlike Model.save(), because a) you provide the filters yourself, so how
many rows the filters match is clearly in your court, and b) the number
of rows updated is returned, so it's not silently throwing away your data).

> I've put up a sample of the multiprocessing situation on github:
> https://github.com/jeroenp/glowing-octo-cyril/blob/master/steps.py

Yes, I understand the scenario you have.

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/546DCC61.4010203%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to