[Catalyst] transactions with DBIx::Class model
Johannes Plunien
plu at pqpq.de
Sat Aug 2 18:16:44 BST 2008
Hi,
On 02.08.2008, at 18:34, Ansgar Burchardt wrote:
> 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"
let's say your model is called 'FilmDB' and you got an 'Actor' schema/
table. I guess you did something like $c->model('FilmDB::Actor')-
>schema->txn_do - right? Please try instead $c->model('FilmDB')-
>schema->txn_do(...).
# to access schema methods directly:
$c->model('FilmDB')->schema->source(...);
HTH,
plu
--
Johannes Plunien | mailto:plu at pqpq.de | http://www.pqpq.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2436 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20080802/b4540026/smime.bin
More information about the Catalyst
mailing list