[Catalyst] How do I use use DBIx::Class::Schema and Catalyst

Marcus Ramberg marcus at thefeed.no
Tue Feb 7 10:55:01 CET 2006


package MyApp::Model::DBIC;

use strict;
use base 'DBIx::Class::Schema::Loader';

__PACKAGE__->load_from_connection(  .... );

1;

HTH :)

Marcus

On 2/5/06, Alex Kavanagh <alex at tinwood.homelinux.org> wrote:
>
> Hi
>
> On the DBIx mailing list it has been announced that
> DBIx::Class::Loader has been deprecated in favour of
> DBIx::Class::Schema::Loader.
>
> I've been using the DBIx::Class::Loader and I'm wondering how to tie
> the Schema stuff into Catalyst.  I think I'd like to do it manually
> rather than use D::C::S::Loader because then I might actually learn
> DBIx properly!
>
> How would I go about doing this?
>
> Currently my model starts with:
>
> package AJKSite::Model::SiteDBIC;
>
> use strict;
> use base 'Catalyst::Model::DBIC';
>
>
> Obviously, C::M::DBIC uses DBIx::Class:Loader.  So what do I put in
> its place?
>
> I'm guessing Catalyst::Model::DBIC::Plain ??
>
> And then start defining all of the relationships in the table classes?
> Plus use __PACKAGE__->compose_connection ??
>
> I noticed in the source of C::M::D::Plain that it does use
> DBIx::Class::Schema
>
> What does everybody else do to get this up and running?
>
> Thanks
> --
> Alex.
>
>
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>



--
With regards
Marcus Ramberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060207/0ed716d8/attachment.htm


More information about the Catalyst mailing list