[Dbix-class] DBIc-Class-ResultSet

Kjell Arne Arvesen kjell.arvesen at siegedesign.no
Mon Apr 10 14:57:22 CEST 2006


Matt S Trout wrote:

>Kjell Arne Arvesen wrote:
>  
>
>>Matt S Trout wrote:
>>
>>I've even tried to do a $user->email("doh") and then call the update 
>>method. Still nothing happens.
>>    
>>
>
>Define "nothing happens" :)
>  
>
>If you turn on debugging in Storage::DBI you should at least see the UPDATE 
>being issued.
>
>My next thought is that you've not set AutoCommit so the UPDATE is issued into 
>a transaction that never gets committed.
>  
>
No UPDATE statement can be found in the log. But the object data gets 
updated but it doesn't get commited to the database.
My AutoCommit is set to 1.

As I use the Catalyst framework and totally fell in love with it, I use 
a DBIC::Schema class for Catalyst that looks like the following:

Here is my Catalyst::Model::DBIC::Schema inherited class:

__PACKAGE__->config(
    schema_class => '::Model::MySchema',
    connect_info => [
        'dbi:mysql:loco',
        'username',
        'pass',
        { AutoCommit => 1 }

    ],
);

This problem puzzles me to no end and I think the culprit might be the 
Catalyst::Model::DBIC or even C::M::DBIC::Schema class.
I will write a simple script that will not use the Catalyst framework 
and see if the problem occurs there as well.

Mvh,
Kjell Arne



More information about the Dbix-class mailing list