> Perhaps save() could be change to actually do this: > (As I started writing my own DB-abstraction-layer once, I know this can > become very handy) > ----------------------------------------------------------------------- > def save(self): # simplified > if self.id: > self._update() > else: > self._insert() > -----------------------------------------------------------------------
Yes, yes! That's exactly what I am trying to suggest for so long... Model.save() which uses Model.add() and Model.add() can be used separately (and independently). > > Adding a new entry > > and updating an existing one are _different_ operations and the should > > not be *automagically* fused together. Even underlying SQL is > > separate! > > Here you are wrong. It really should be fused, as this makes things > really easy. But I think allowing the user to explicit use UPDATE or > INSERT would be a nice feature. They should be fused alright, but application writers should have separate "INSERT only" option. (Maybe, you didn't get the sarcasm ;-) ) Thanks David! It feels nice when someone finally understands the point (esp. after being mistake for "wrong-list-guy" :-) ). Cheers! arvind1 --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---