> If you abandon the record check when pk_set, then you lose the ability
> to manually specify an ID for use in insert.

Thats why the comment above says "simplified", perhaps it was
oversimplified...:
-----------------------------------------------------------------------
def save(self): # not so simplified, but still very simple
  if pk_set:
    if record_exists():
      self._update()
    else:
      self._insert()
  else:
    self._insert()
-----------------------------------------------------------------------
The goal is to have UPDATE- and INSERT-Methods that are independent of
save() and can be called directly (if you know what you do). Anyhow
there needs to be some logic inside save(), of course.
I'm not familiar with the current implementation of save(), so I don't
know how complex it would be to accomplish this, but it sounds easy.

Greetings, David Danier

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to