#2108: Empty models result in invalid SQL for Sqlite
------------------------------+---------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Type: defect | Status: reopened
Priority: normal | Milestone:
Component: Database wrapper | Version:
Severity: normal | Resolution:
Keywords: sqlite |
------------------------------+---------------------------------------------
Changes (by [EMAIL PROTECTED]):
* resolution: fixed =>
* status: closed => reopened
Comment:
Inserting NULL into an automatically-incremented field is a common idiom
that works in sqlite, mysql, and sql server at least.
Regardless, your solution -- to not save anything -- is wrong. There are
cases where a model might have no fields but an id. The one I've got at
the moment is a shopping basket, which at the moment does not refer to any
other models -- but other models refer to it. If the basket silently
fails to be saved, then the other model objects will also fail, all
without a clear reason.
Either Django should support tables with just an id field, or it should
throw a ValidationError or some such. Silently failing is not good.
--
Ticket URL: <http://code.djangoproject.com/ticket/2108>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates
-~----------~----~----~----~------~----~------~--~---