[Catalyst] Where and how to access database

Stephan Austermühle au at hcsd.de
Wed Mar 21 10:39:40 GMT 2007


Hi,

I want to place some database queries in App/lib/App/Modell/App.pm. How
can I access the DBI database handle in that module? Is that the right
place for complex queries?

The database tables are being loaded dynamically by
Catalyst::Model::DBIC::Schema/ DBIx::Class::Schema::Loader. I read that I
can get the DBH via $schema->storage->dbh -- but where do I get $schema
from?

Thanks for your help,

Stephan



More information about the Catalyst mailing list