[Catalyst] table discovery
Thomas L. Shinnick
tshinnic at io.com
Thu Oct 6 12:12:01 CEST 2005
At 04:11 10/6/2005, you wrote:
>So I mostly succeeded in setting up a scaffolded server. The
>relationships were a bit tricky, as for others, but it all
>worked out in the end.
>(I referred mostly to MoviesScaffoldingDemoTranscript and to
>the Class::DBI doc on relationships. And to the mailing list
>archive where relationships are explained on a regular basis.
>And it still took some tries to get it right. Ah well.)
>The process left me with some questions.
>* is the list of tables regenerated each time, independent of
>whatever Model classes I have available?
I think so, just look at your debug output, like
[Thu Oct 6 05:08:52 2005] [catalyst] [debug]
Loaded tables "sessions uwlognames uwprogress ... uwusers"
>* if it is generated, this happens probably through
>Class::CBI::Loader->tables. Can I access this method (or the
>list of tables) from within my app? MyApp::M::CDBI->tables
>and variations on that theme don't seem to do it.
What worked for me was
where $cbdi_class is your model component class that did the
use base 'Catalyst::Model::CDBI';
The other Class::DBI::Loader methods like find_class()
will also be available this way. Of course this must be
done after setup() has been called.
>What _is_ scaffolding, btw? Does this application of the term
>to DB frontends originate with Rails? Or is it an earlier
More information about the Catalyst