[Dbix-class] Schema::Loader and has_many

Brandon Black blblack at gmail.com
Wed Mar 22 17:58:56 CET 2006


On 3/22/06, Vsevolod (Simon) Ilyushchenko <simonf at cshl.edu> wrote:
> Thanks! It works now. So what is the purpose of even having the M tree?
> Just deceiving Catalyst into thinking that there is a model after all?
>

Catalyst::Model::DBIC::Schema is just a way to make a convenient
Catalyst model that references an external Schema class.  There really
is a model, not just a deception, and it is a little bit different
than what you would get if you simply created your Schema under the
"M" or  "Model" directory.  For instance, it provides resultset
shortcuts as $c->model('MySchema::SomeTable').

Another way to think of it is that Catalyst::Model::DBIC::Schema is a
DBIx::Class::Schema<->Catalyst::Model adaptor of sorts.

-- Brandon



More information about the Dbix-class mailing list