I got some help from the DBIx list today which helped me get the txn_do()
method working for my schema which is created with the loader

----Schema--------
package kRadDB;

use strict;
use base qw/DBIx::Class::Schema::Loader/;

__PACKAGE__->loader_options(
    relationships => 1,
);

The solution was to create a schema instance like so,

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

Then do the transaction

$schema->txn_do($coderef);


This does accomplish what I was trying to do but aren't there some
connections around that I could use rather than manually connecting each
time I need to do this transaction?

The docs for Catalyst-Model-DBIC-Schema say

# to access schema methods directly:
$c->model('FilmDB')->schema->source(...);


When I try a similar thing,

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

I get this error " Can't call method "schema" without a package or object
reference"

Thanks for any advice/help,
 Jason


_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to