Re: [CDBI] Auto increment with two-column primary keys

Perrin Harkins <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
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
though.

- Perrin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.