The following code:
>>> from mainapp.models import ServerType
>>> server_type = ServerType()
>>> server_type.name = 'Origin'
>>> server_type.save()
>>> server_type.id
4L
generates mysql log:
SET NAMES utf8
set autocommit=0
SET SQL_AUTO_IS_NULL = 0
INSERT INTO `ServerType` (`name`, `description`) VALUES ('Origin', '')
commit
How does django know the new id without extra select statement?
django=1.4
mysql=5.1