[Catalyst] Apache <-> DB-Problem
Matt S Trout
dbix-class at trout.me.uk
Sun Nov 6 15:45:02 CET 2005
On Sun, Nov 06, 2005 at 11:33:14AM +0100, Florian Rossol wrote:
> Hi list,
>
> I have no idea if this is a catalyst or a mod_perl/Class::DBI problem,
> so please excuse me if this is not catalyst related.
>
> I have built a littel catalyst-application: only one PostgreSQL-table
> with three columns: id (int), name (text), content (text). Here the
> CDBI.pm-file:
>
> ---(snipp)---
> package app::M::CDBI;
>
> use strict;
>
> use base 'Catalyst::Model::CDBI';
>
> __PACKAGE__->config(
> dsn => 'dbi:Pg:dbname=app',
> user => 'user',
> password => 'password',
> additional_classes => [
> qw/Class::DBI::AbstractSearch Class::DBI::Plugin::AbstractCount
> Class::DBI::Plugin::Pager Class::DBI::FromForm/
> ],
> options => { AutoCommit => 1},
> relationships => 1,
> );
> ---(snapp)---
>
> My Controller is made with the Mason Helper for Scaffolding (I use
> Mason-templates), so I can add, delete, modify and view entries in the
> table.
>
> With the standalone HTTP-server, which comes with catalyst everything
> runs fine, but with apache (1.3) with mod_perl the following error
> appears:
>
> When I edit the same entry in the table serveral times, after some
> time in the view and edit-page appears randomly older versions of the
> entry. At this time I checked the DB, but in the table in the DB the
> entry was correct at the newest version, so there is no error during
> writing the modified version to the DB.
Try setting
$Class::DBI::Weaken_Is_Available = 0;
somewhere. That'll turn off the Class::DBI Live Object Index, which has
caused me no end of pain under mod_perl (which is the main reason DBIx::Class
doesn't use one by default :).
--
Matt S Trout Specialists in Perl consulting, web development, and
Technical Director UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Catalyst
mailing list