[Catalyst] transactions with DBIx::Class model

Ansgar Burchardt ansgar at 2008.43-1.org
Sat Aug 2 17:34:31 BST 2008


Hi,

I am using Catalyst with a DBIx::Class model (via C::M::DBIC::Schema)
and want to do serveral database updates in a transaction.  To do this I
need the schema object to call $schema->txn_do($whatever).

The C::M::DBIC::Schema documentation says that I should be able to
access the schema object via $c->model("MyApp::Something")->schema, but
if I do so I get the following error:

    Can't locate object method "schema" via package
    "DBIx::Class::ResultSet"

I'm using
  Catalyst                      5.7014
  Catalyst::Model::DBIC::Schema 0.20
  DBIx::Class                   0.08010

How can I use DBIx::Class' transaction support?

Regards,
Ansgar

-- 
PGP: 1024D/595FAD19  739E 2D09 0969 BEA9 9797  B055 DDB0 2FF7 595F AD19



More information about the Catalyst mailing list