Subject: | Multi-insert and AutoCommit=0 regression |
I just upgraded from DBIx::Class 0.08108 to 0.08115 and I think I found
a regression. I'm using AutoCommit=0 and when I try to do create a new
row with related rows I get the following error:
"DBIx::Class::ResultSet::create(): DBI Exception: DBD::mysql::db
begin_work failed: Already in a transaction"
Some sample code that triggers the error:
use My::Schema;
my $schema = My::Schema->connection(
$dsn, $user, $pass, { AutoCommit => 0 }
);
$schema->resultset('MyResultset')->create({
category => 'test',
date => 0,
contents => [ { lang => 'en', title => 'Test' } ],
});
When I set AutoCommit=1 or when I don't create the related row for
"contents" everything works fine.