FAQ

Michael Giambalvo ha scritto:
For some reason, I can't make a model based around Class::DBI.

Unfortunately, I have to work with a custom database backend, so
there's no Class::DBI::Loader support, so Catalyst::Model::CDBI is
out.

I'd like to use Enzyme, but that depends on having instantiated model
objects in $c->components. Unfortunately, this rules
Catalyst::Model::CDBI::Plain out, since all the objects it creates are
Catalyst::Base.

For some reason, whenever I have a Class::DBI class inherit from
Catalyst::Model (or Catalyst::Base), the accessors no longer work.
So, I can use the model to search, but calls to get fields never make
their way down to Class:DBI.

Any ideas?
IME the C::DBI classes should not inherit directly from C::Base. My
usual setup is:

in MyApp::Model::CDBI;
use base 'Catalyst::Model::CDBI'; # or ::Plain

in MyApp::Model::CDBI::Products:
use base 'MyApp::Model::CDBI';

HTH
_______________________________________________
Catalyst mailing list
Catalyst at lists.rawmode.org
http://lists.rawmode.org/mailman/listinfo/catalyst

--
Marcello Romani
Responsabile IT
Ottotecnica s.r.l.
http://www.ottotecnica.com

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJun 8, '06 at 10:13p
activeJun 9, '06 at 6:20a
posts3
users3
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase