[Catalyst] update_or_create problem with Catalyst::Engine::Apache::MP13 and DBIC

Anthony Lincoln ahlincoln at lbl.gov
Fri May 26 01:06:04 CEST 2006


Okay, I've been building a little app using Catalyst, and I like it a 
lot.  However, when it came time to deploy said app on my Apache 1.3.33 
server running mod_perl 1.29, all sorts of things don't work the same at 
the database layer.

Apparently the MP engine uses DBIx::Class::Storage::DBI::Oracle.pm while 
the standalone server does not.  I had to muck around in there because 
schema tablenames (schema_name.tablename) seem to be treated differently 
than most other modules at this layer.  Once I instructed them to strip 
out the schema_name, my data model objects came back.  And there were 
some differences in how my TT templates got parsed.  Also, and this is 
maddening, update_or_create always wants to create, and never update, 
even when I specify something like:

             my $outage = $model->update_or_create({
                 id => $id,
                 problem_ticket => $outage{problem_ticket},
                 creator => $creator,
             },{ key => 'primary' } );

This works fine on the standalone server, but never does with the Apache 
engine!

Can anyone shed some light on why this is happening, and what 
workarounds might be available, short of just not using 
update_or_create?  This is driving me bonkers.

Thanks,

Tony






More information about the Catalyst mailing list