tags:

views:

100

answers:

1

I am using CL-SQL with SQLite backend, and I can't quite get autoincremented primary keys to work. I declared a slot like (in def-view-class):

((id :accessor d-id :db-constraints :primary-key :type integer :db-type "INTEGER")

But if I create the class, the field is not updated, not even when I call update-records-from-instance, and if I call update-instance-from-records, it will get updated wrong. Is there a way to use autoincremented fields CL-SQL at all?

A: 

I think this might be caused by a bug. I've sent a patch to the clsql mailing list which fixes the problem for me:

Rupert Swarbrick