I think ORM supposed to have save insert and update:

save(force_insert=False,force_update=False)
update() == save(force_update=True)
insert() == save(force_insert=True)

in that situation we could have clean code and we know that update is 
realy update on DB

i now we can have save(force_update=True) but update() looks better and 
we have insert() already

IMHO save() is only wrapper for save_base()

W dniu 16.01.2009 00:15, Jan Bednařík pisze:
> On Thu, Jan 15, 2009 at 11:11 PM, Collin Grady<col...@collingrady.com>  wrote:
>    
>> On Thu, Jan 15, 2009 at 2:09 PM, Jan Bednařík<jan.bedna...@gmail.com>  wrote:
>>      
>>> That should not happen.
>>>
>>> instance.delete()
>>> instance.save()
>>>
>>> should raise ObjectDoesNotExist exception. Any other behavior is bug.
>>>        
>> Why? You have a perfectly valid object instance, and you're then saving it.
>>      
>
> Because I deleted that object. Delete method should be non-reversible
> (except in transactions) like "del" statement in Python. Or anybody
> knows any reason, why it should be reversible?
>
> If I try to call save() or any other method on deleted object, than
> it's just and only my mistake and I should get exceptions. But quiet
> undelete effect of save() method can cause lot of "hard to find" bugs
> in final app. Especially if probably nobody is expecting something
> like that.
>
> Jan
>
> >
>
>    

--~--~---------~--~----~------------~-------~--~----~
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