[Catalyst] Reference to the connected Model::DBIC schema for testing?

Jesper Krogh jesper at krogh.cc
Thu Oct 12 13:29:00 CEST 2006


Matt S Trout wrote:
> Drew Taylor wrote:
>> On 10/10/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
>>> my $model_dbic_schema_object = MyApp->model('Foo');
>> Shouldn't the name actually be "$model_dbic_resultset_object"? I'm
>> still trying to wrap my head around _all_ of DBIC, so I'm not just
>> being pedantic. :-)
> 
> No. MyApp::Model::Foo isa C::M::DBIC::Schema
> 
> If you had a Bar class in the relevant schema,
> 
> MyApp->model('Foo::Bar') would give you a DBIx::Class::ResultSet though.

What if you want to access the ResultSource ?

Situation: I sometimes find that I need "create-logic" and I would
really like to put it into the schema-definitions classes (ResultSource
if I'm not wrong), but I cannot seem to get direct access to those from
within Catalyst?

Jesper
-- 
Jesper Krogh, jesper at krogh.cc




More information about the Catalyst mailing list