Hi all,
I'm using Maypole with postgres 7.4. So far its working great with the
beer example. I've added some of my own tables, specifically one with
the Foreign-key constraint: "$1" FOREIGN KEY (category) REFERENCES category(id).
When I try to use the do_edit method, though, I get the failure:
DBD::Pg::st execute failed: ERROR: insert or update on table "example" violates
foreign key constraint "$1" [for Statement "INSERT INTO example (email, summary,
worth, id, description)
VALUES (?, ?, ?, ?, ?)
"] at /usr/local/lib/perl5/site_perl/5.8.5/DBIx/ContextualFetch.pm line 51.
[Sat Aug 14 18:53:06 2004] [error] Can't insert new Hookups::Hookup: DBD::Pg::st
execute failed: ERROR: insert or update on table "example" violates foreign key
constraint "$1" [for Statement "INSERT INTO example (email, summary, worth, id,
description)\nVALUES (?, ?, ?, ?, ?)\n"] at
/usr/local/lib/perl5/site_perl/5.8.5/DBIx/ContextualFetch.pm line 51.\n at
/usr/local/lib/perl5/site_perl/5.8.5/Class/DBI/FromCGI.pm line 246\n
I have this relationship specified in the BeerDB class: 'a category has
examples'. The row is being displayed correctly as a drop down lists
with options from the category table. Is the update of a row a two step
process? Is there a way to keep constraints specified in postgres as
well as Maypole?
Thanks,
Jim
_______________________________________________
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:56 GMT