in reply to Catalyst: model & context object usage
I am a Catalyst newbie as well but it seems to me you might not have the database or DBIC schema setup right. I would make sure you have the primary keys properly defined in the tables and that Schema/ files were created (assuming you are using the static schema by now like in the tutorial).
DBIC should increment the primary key for you automatically and you don't need to supply it in create. To find documentation on create() look at ResultSet in DBIx::Class. The $c->model('...') objects inherit from DBIx::Class.
I seem to remember uri_for screwing up on me the same way but I never found out why.
But start at the database, use DBIC_TRACE=1 script/myapp_server.pl or temporarily switch to SQLite like in the tutorial?
|
|---|