On 5/25/07, Eden Cardim <[EMAIL PROTECTED]> wrote:
On 5/25/07, Jason Konrad <[EMAIL PROTECTED]> wrote:
> I'm attempting to add transaction support to my Catalyst app which is using
> DBIx but I am getting this error while trying to execute
>
> eval {
>    $rs = kRadDB->txn_do($coderef);
> };
>
>
> 'DBIx::Class::Schema::txn_do(): txn_do called on $schema without storage at'

txn_do() isn't a class method, so you need to run it on a connected
schema instance:

    my $schema = kRadDB->connect(...);
    $schema->txn_do($coderef);


Really since he's using Catalyst, he should be using
Catalyst::Model::DBIC::Schema and then:

$c->model('kRadDB')->schema->txn_do($coderef)

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to