[Catalyst] Adding relationships to loaded CDBI models
chris at wiw.org
Thu Jun 16 19:15:52 CEST 2005
So a model based on Catalyst::Model::CDBI loads up all my tables and
But then how do I extend one of those auto-generated classes with extra
For instance, in my MyApp::M::CDBI I would like to do this:
use base 'Catalyst::Model::CDBI';
__PACKAGE__->config( ... );
date => 'Class::Date',
inflate => 'new',
deflate => 'epoch'
But at the time that MyApp::M::CDBI is loaded, the MyApp::M::CDBI::Table
class doesn't exist yet. I could use Catalyst::Model::CDBI::Plain and
define everything myself, but is there any way to take the ease of
C::M::CDBI and extend it a little?
More information about the Catalyst