Robin Munn <robin.munn <at> gmail.com> writes:

> Django will only auto-increment fields listed as AutoField. If you use
> any other type (CharField, IntegerField), it's assumed that you want
> to specify the primary key yourself each time.

The only drawback seems that you can never specify the id when you use 
AutoField--it is ignored when you save(). Of course, usually you do not want to 
do this, but, for instance, when importing records from a legacy system you may 
want to retain the keys.  To do this I had to just dbapi directly (though 
perhaps I could have used the DB module.)


Reply via email to