[Catalyst] problem with DBIx, Catalyst and PostgreSQL
Luca Ferrari
fluca1978 at infinito.it
Thu Jan 29 10:20:42 GMT 2015
Hi all,
I'm working on an application and I've a problem I cannot resolve.
I've a postgresql database with a workers table, loggin of queries is on.
I've created the schema with:
% perl script/smickets_create.pl model SmicketsDB DBIC::Schema
Smickets::Schema create=static dbi:Pg:dbname=smicketsdb username
password
and I've got the Result for the table Workers in
lib/Smickers/Schema/Result/Workers.pm.
So everything seems fine to me, but when in my controller I try to do:
my $workers = $c->model( 'SmicketsDB::Workers' )->all();
I got the following error:
Caught exception in Smickets::Controller::Workers->list "Can't call
method "all" on an undefined value at
/mnt/ada1a/sviluppo/Perl/Smickets/script/../lib/Smickets/Controller/Workers.pm
line 35."
I've checked that the database connection info is ok, and that the
table contains some data. Moreover, I cannot see any query running
against the database.
What am I missing?
Thanks,
Luca
More information about the Catalyst
mailing list