in reply to Class::DBI find_or_create

I did find out what went wrong, but I don't know whether or how to delete the question so I shall just answer it ;)

contrary to some documentation I read, one should explicitely declare the primary key, I thought it would automatically be the first ( that is what I read in the doc ) in the 'ALL' list. That is not the case. So MyDB::Foo now reads

package MyDB::Foo; use base MyDB; __PACKAGE__->table('foo'); __PACKAGE__->columns( PRIMARY =>qw/foo_id/ ); __PACKAGE__->columns( ESSENTIAL =>qw/name uri/ ); ); 1;
and all is well... ;)

Replies are listed 'Best First'.
Re^2: Class::DBI find_or_create
by choroba (Cardinal) on Dec 29, 2011 at 10:50 UTC
    Answering your own question is a good way. If anyone gets in a similar situation, he/she can search for the question and find the answer helpful.