[Maypole] Unusual error involving CDBI - DBIx:CF - FromCGI

From: Torsten Seemann (torsten.seemann at infotech.monash.edu.au)
Date: Fri Feb 11 2005 - 02:38:38 GMT


Hi,

I just put together a basic Maypole app using automatic setup
to a MySQL InnoDB database. Actions "list" and "view" seem to
work ok, but any create or edit seem to do nothing, ie "do_edit".

The following errors appear in the web server error log (and also when I
use Maypole::CLI). Also appended is a table schema and my Maypole class.

Any ideas what would cause these errors or cause do_edit to fail?

Thanks for any help!

--Torsten

[Fri Feb 11 11:45:17 2005] [error] Loaded tables:
gel,gene,oligo,organism,pcr,person at
/usr/lib/perl5/site_perl/5.8.3/Maypole/Model/CDBI.pm line 244., referer:
http://localhost/boyligo/maypole.cgi/person/do_edit/

[Fri Feb 11 11:45:17 2005] [error] Can't insert new
Boypole::Person: DBD::mysql::st execute failed: Duplicate entry '' for
key 2 [for Statement "INSERT INTO person (id), referer:
http://localhost/boyligo/maypole.cgi/person/do_edit/

[Fri Feb 11 11:45:17 2005] [error] VALUES (?),
referer: http://localhost/boyligo/maypole.cgi/person/do_edit/

[Fri Feb 11 11:45:17 2005] [error] "] at
/usr/lib/perl5/site_perl/5.8.3/DBIx/ContextualFetch.pm line 51.,
referer: http://localhost/boyligo/maypole.cgi/person/do_edit/

[Fri Feb 11 11:45:17 2005] [error] at
/usr/lib/perl5/site_perl/5.8.3/Class/DBI/FromCGI.pm line 246, referer:
http://localhost/boyligo/maypole.cgi/person/do_edit/

CREATE TABLE `person` (
        `login` VARCHAR(100) UNIQUE NOT NULL,
        `name` VARCHAR(100) NOT NULL,
        `email` VARCHAR(100) NOT NULL,
        `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
) ENGINE=InnoDB;

package Boypole;
use Maypole::Application qw(-Debug);
use Class::DBI::Loader::Relationship;
__PACKAGE__->setup("dbi:mysql:XXX", "YYY", "ZZZ");
__PACKAGE__->config->application_name('Boyligo');
__PACKAGE__->config->uri_base( ETC );
__PACKAGE__->config->template_root( ETC );
1;

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:58 GMT