> ...In which case, you'd get still get an error if there was a
> collision on ID, and you'd still need to generate a new ID and try
> again.  I guess you're just trying to avoid the "check if a record
> with that pk exists" bit on inserts?  And you (the app dev) would be
> responsible for handling the error?

Yeah, in case of explicit insertion, app dev should be given the
chance to handle the exception.

In fact, there should be separate add/insert() and update for explicit
use and save() (which calls insert or update) for implicit use.

This is the same way get() and get_or_create() are separate: if app
dev uses get(), he handles the exception.

Arvind

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