Thank you Massimo, with KeyedTable I get the same errors.
BUT if tables defined like this:
db.define_table('cars',
Field('car_id','id'), #note 'id' type
Field('model_id','integer'),
migrate=False
)
#note no primaykey
everything works!
I think it shell be int the docs in BIG letters that KeyedTable shell
NOT be used if a table has a unique integer field that shell be mapped
to 'id' field by giving it 'id' type.

