On 9/25/05, Paulo Silva <[EMAIL PROTECTED]> wrote:
> > > Did you set  { AutoCommit => 1 } in the connection parameters?
> >
> > Yes.
> >
> > Is the Class::DBI::Loader::Pg responsible for using the parameters?
> > Maybe there is a chance that the { AutoCommit => 1 } is being ignored
> > somewhere?
>
> I think this was the problem. After manually patching the
> class /usr/share/perl5/Class/DBI/Loader/Generic.pm, forcing the insert
> of { AutoCommit => 1 } the problem was solved:
>
> ##########################################################
>
> sub new {
>     my ( $class, %args ) = @_;
>     if ( $args{debug} ) {
>         no strict 'refs';
>         *{"$class\::debug"} = sub { 1 };
>     }
>
>    ...
>
>     $args{options} = { AutoCommit => 1 }; # forced commit
>     my $self = bless {
>         _datasource =>
>           [ $args{dsn}, $args{user}, $args{password}, $args{options} ],
>         _namespace       => $args{namespace},
>         _additional      => $additional,
>         _additional_base => $additional_base,
>         _left_base       => $left_base,
>         _constraint      => $args{constraint} || '.*',
>         _exclude         => $args{exclude},
>         _relationships   => $args{relationships},
>         _inflect         => $args{inflect},
>         CLASSES          => {},
>     }, $class;
>
>

That's pretty weird. Your setup call looks like this:

CD->setup('dbi:Pg:dbname=xxxx', 'xxxx', 'xxxx', {AutoCommit => 1});

including the curly braces?

What version of Maypole are you using? There was a bug in a previous
version that could have caused this behaviour.

d.


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to