Responding to Arvind's post on Django developer:  http://tinyurl.com/39d4vc

In some models, I have add() and update()
methods which call save() so I can perform
extra operations.  Since my app knows
whether I want to add vs. update, there's
no extra query involved unless I choose
to make one by asserting the pk does|doesn't
exist.

> which just means, refactoring save() to save() and
> add() which will keep it compatible. Otherwise, may
> I ask why present save() was chosen over save()
> and add() ?

I'm not aware of the design decisions that went into the ORM (and
don't have an issue with this one), but I could see where there might
be some advantage with a trio of add/update/save methods, at the risk
of additional api overhead.

--
Jeff Bauer
Rubicon, Inc.


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

Reply via email to