[Catalyst] CDBI Plain not inheriting table and columns
Jonathan Manning
jmanning at alisa-jon.net
Tue Aug 2 21:17:53 CEST 2005
Jesse Sheidlower wrote:
> However, the dirty little secret of CDBI::Plain is that it really
> does nothing at all, as a glance at the source will show--it just
> inherits from Catalyst::Base and that's really it.
I had noticed that. I guess I was asking if I could even skip
Catalyst::Base - or is this essential for a Model class?
> If you want, try this:
>
> package CatalystApp::M::Experiment;
> use base qw/Catalyst::Base MyOther::Obj::Experiment/;
> 1;
>
> and you _should_ get the functionality you seek without having
> to worry about Plain.pm.
Clearly Plain.pm is doing something, because that works, at least
somewhat. My Primary Key and Essential fields are filled in now in the
view (and it no longer dies - a big plus). It still doesn't allow access
to any non-Essential fields - they appear blank.
So:
use base qw/Catalyst::Model::CDBI::Plain MyOther::Obj::Experiment/;#dies
use base qw/Catalyst::Base MyOther::Obj::Experiment/; # partial data
use base qw/MyOther::Obj::Experiment/; # works, but lacks Catalyst
use base qw/MyOther::Obj::Experiment Catalyst::Base/; # Complains about new?
~Jonathan
More information about the Catalyst
mailing list