[Catalyst] Is C::M::CDBI::Plain deprecated? (ignore previous post)
Brian Kirkbride
brian.kirkbride at deeperbydesign.com
Thu Mar 2 23:41:14 CET 2006
Len Jaffe wrote:
> I've trimmed a lot of your post. I won't address
> every bit individually, but I'm also using
> CDBI::plain. I have been unable to get CDBI::plain
> and catalyst to recognize my existing CDBI classes, so
> I have all of my methods in my app::M::CDBI classes.
> I also don't have the code in front of me so I can't
> provide source code now. But I'd like to correspond,
> eiher on list or off, sicne we iconoclasts are a dying
> breed.
>
> It's kind of a bummer that the catalyst examples are
> all moving to a new ORM, just as I'm finally
> comfortable with CDBI :-) I'm also a little concerned
> abotu finding kwalitee hosting that will have support
> for DBIC, but that's an issue for later when the app
> is finished.
>
> L.
>
I agree, I'll probably move to DBIC after the app is up and running. That's
the great thing about MVC, right? :)
In the meantime, the solution does seem to require that Catalyst::Model come
after other base classes in @ISA. But new() must be Catalyst::Component->new()
and COMPONENT() must be Catalyst::Component->COMPONENT.
I've attached a fairly straightforward solution to the problem. It's a new
model class Catalyst::Model::Existing. It provides a completely generic
and safe way to integrate existing model classes into Catalyst without the
headache I just went through.
Comments/criticism?
- Brian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Catalyst_Model_Existing.pm
Url: http://lists.rawmode.org/pipermail/catalyst/attachments/20060302/465ece9b/attachment-0001.diff
More information about the Catalyst
mailing list