Hello Igor,

* Igor Tandetnik <itandet...@mvps.org> [2010-12-05 11:53:17 -0500]:

> If you want ID to be auto-incremented, then it will always be unique on its 
> own. Why then do you want a compound primary key? Just declare
> 
> ID integer primary key

thanks for answering. Well, without wanting to open up a general discussion
on the merits or not of having compound primary keys with one auto-increment
value, i had other technical constraints in mind relating to perl's
Catalyst::Model.

I solved my issue by recurring to DBIx::Class::ResultSource's
set_primary_key("id","b") w/i the Schema resultset and declaring the CREATE
statement as you indicated.

But why not make autoinc feasible on compound primary keys if only one
of the keys is of type INTEGER? Is it a design reason or is there another
obvious reason i can't see?

Thanks again
Chris 
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to