I have the following Maypole app (shown here in simplified form): PermaVat->setup('dbi:Pg:dbname=debian', scalar(getpwuid($>))); PermaVat->config->{rows_per_page} = 20; PermaVat->config->template_root("/var/www/debian/templates"); PermaVat->config->display_tables([qw[versions]]); PermaVat::Versions->has_a(package => 'PermaVat::Packages'); PermaVat::Versions->has_a(status => 'PermaVat::Status');
The database it's accessing is shown at the end of the message. When I try to access the versions page, I get: > undef error - DBD::Pg::st execute failed: ERROR: invalid input syntax for > integer: "grub-doc" > [for Statement "SELECT checksum, status > FROM versions > WHERE package=? AND version=? > " with ParamValues: 2='0.97-4', 1='grub-doc'] at > /usr/share/perl5/DBIx/ContextualFetch.pm line 51. That is, when maypole goes to query the db, it presents the package to the database via package.name intead of package.id. However, the status column is handled properly. I'm not sure why the two are being treated differently. Do I have to change how the view template displays that item, or am I missing something here? Thanks, Dave DB: debian=# \d versions Table "public.versions" Column | Type | Modifiers ----------+------------------------+----------- package | integer | not null version | text | not null checksum | character varying(256) | not null status | integer | not null Indexes: "versions_pkey" PRIMARY KEY, btree (package, version) Foreign-key constraints: "versions_package_fkey" FOREIGN KEY (package) REFERENCES packages(id) "versions_status_fkey" FOREIGN KEY (status) REFERENCES status(id) debian=# \d packages Table "public.packages" Column | Type | Modifiers --------+---------+--------------------------------------- id | integer | not null default nextval('ids'::text) name | text | not null Indexes: "packages_pkey" PRIMARY KEY, btree (id) "packages_name_key" UNIQUE, btree (name) debian=# \d status Table "public.status" Column | Type | Modifiers --------+---------+--------------------------------------- id | integer | not null default nextval('ids'::text) name | text | not null Indexes: "status_pkey" PRIMARY KEY, btree (id) "status_name_key" UNIQUE, btree (name) ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Maypole-users mailing list Maypole-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/maypole-users