[Catalyst] Newbie with the tutorial and Postgresql

lbmlist at hethcote.com lbmlist at hethcote.com
Wed May 30 04:06:13 GMT 2007


Hi all,

I've been working through the tutorial, converting over to postgresql, and =

get the http://localhost:3000/books/list working fine. When I move to the =

BasicCRUD portion and the url_create =

(http://localhost:3000/books/url_create/TCPIP_Illustrated_Vol-2/5/4)

my result is:

  Caught exception in MyApp::Controller::Books->url_create =

"DBIx::Class::ResultSet::create(): Error executing 'INSERT INTO books =

(rating, title) VALUES (?, ?)': ERROR:  null value in column "id" violates =

not-null constraint"


lib/MyAppDB/Book.pm has

# Load required DBIC stuff
__PACKAGE__->load_components(qw/PK::Auto Core/);


which I think means that the=C2=A0automatci primary key should be inserte =

(although I may need to create a sequence).

I am such a newbie that I'm not sure if I'm missing something with DBIC or =

should create a Pg sequence with appropriate names, or am completely =

offbase.

Any assistance would be appreciated.

Thanks in advance,

Louis


More information about the Catalyst mailing list