>>> Shows how infrequently AutoField's are really used in practice. >>> They're >>> generally just not that useful to specify. >> >> >> What else do people use for specifying autoinc fields? > > Auto-increment fields generally aren't that useful in practice, > outside > of primary keys (the reasonsing being that, since they can act as > primary keys, you might as well make it the table's primary key if > you're using one. A non-primary key auto-inc field is usually a sign > of > an unnecessarily denormalised data model). Since Django automatically > creates an auto-increment primary key field, the majority of the time > the manual specification isn't needed.
I always make my auto-inc fields primary as well, so no argument there. I tried using the AutoField when I noticed django didn't create the auto-incrementing fields correctly by itself in sqlite, but that didn't work either until I patched it. Alec --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---