[CDBI] Auto increment with two-column primary keys

Perrin Harkins perrin at elem.com
Wed Jun 7 19:57:41 BST 2006

On Wed, 2006-06-07 at 13:34 -0500, Tim Kearney wrote:
> I'm have a table with a two-column primary key, where one column is an 
> auto-incremented value.

Why?  You already know the auto_increment is unique.  This sounds like a
table design mistake.  Maybe you actually need two tables here, or a
separate unique constraint.

> I've read in the Class::DBI documentation that I cannot insert rows into 
> this table without knowing what both of the keys in my two-column 
> primary key are in advance.

Try passing undef.  It might work.  I think you should change the table

- Perrin

More information about the ClassDBI mailing list