[Catalyst] More complex Class::DBI::Sweet usage?
Danijel.Milicevic at rawmode.org
Fri Jul 1 12:07:32 CEST 2005
Am Freitag, den 01.07.2005, 10:36 +0100 schrieb Toby Corkindale:
> In Catalyst, where is the preferred place to setup custom queries for
> autogenerated (via C::M::CDBI) classes?
> In a package named exactly the same, so you can do __PACKAGE__->set_sql(), or
> in a different package (ie. via C::M::CDBI::Foo->set_sql()) which must be
> run after the setup stage of C::M::CDBI)?
In order for Catalyst to pick up your models you should place them in
the MyApp::M:: namespace. You can do that manually for non-cdbi models
or just use the helper script and a existing database:
gabbana at spalato:~$ MyApp/script/myapp_create.pl model CDBI CDBI
Now just edit MyApp::M::CDBI::Cart for example and add your
> (Porting from Maypole)
Welcome to Catalyst. :)
More information about the Catalyst