[Dbix-class] What am I doing wrong (not seeing updates)

Matija Grabnar matija at literal.si
Mon Jul 10 14:20:40 CEST 2006


I placed a $schema_>txn_commit there out of desparation, but it didn't 
make any difference.

There are no UPDATE statements issued after I change the value of the field!

Even though autocomit is ON. I must be doing something blidingly stupid,
please be gentle with me.

my $schema = My::Schema->connect(
    'dbi:mysql:database',
    'toot',
    'secret',
    { AutoCommit => 1 },
  );

my $sch = $schema->resultset('My::Schema::Orders');
my $o = 
$sch->search({sessionid=>'7b90a03af16a72787e17bd183d9ccf33'})->single;
$o->created('2006-07-10 12:10:11');
$schema->txn_commit;

I don't get any result from the update


main::(test:5): my $schema = LekVeterina::Schema->connect(
main::(test:6):     'dbi:mysql:database',
main::(test:7):     'toot',
main::(test:8):     'secret',
main::(test:9):     { AutoCommit => 1 },
main::(test:10):          );
  DB<1> n
main::(test:33):        my $sch = $schema->resultset('My::Schema::Orders');
  DB<1> n
main::(test:34):        my $o = 
$sch->search({sessionid=>'7b90a03af16a72787e17bd183d9ccf33'})->single;
  DB<1> n
SELECT me.id, me.created, me.completed, me.dispatched, me.user, 
me.sessionid, me.shipping_sit, me.shipping_euro, me.total_sit, 
me.total_euro, me.total_sit_wtax, me.total_euro_wtax FROM orders me 
WHERE ( sessionid = ? ) (`7b90a03af16a72787e17bd183d9ccf33')
main::(test:35):        $o->created('2006-07-10 12:10:11');
  DB<1> n
main::(test:36):        $schema->txn_commit;
  DB<1> n
Debugged program terminated.  Use q to quit or R to restart,




More information about the Dbix-class mailing list