[Catalyst] Mapping Schema to Model in Catalyst?

Matt S Trout dbix-class at trout.me.uk
Sun May 14 14:06:42 CEST 2006


John Napiorkowski wrote:
> Dennis,
> 
> I think your problem is how you setup the Schema. 
> Based on your code example I think if you replaced the
> following:
> 
>> $c->stash->{quotes} =
>> [$c->model('CatapultDB::Quotes')->find($id)];
> 
> with 
> 
>> $c->stash->{quotes} =
>> [$c->model('Quotes')->find($id)];
> 
> I think it would work.

I sincerely doubt that's the answer; if the C::M::DBIC::Schema class is 
called MyApp::Model::CatapultDB then you definitely want 
model('CatapultDB::Quotes'); just supplying 'Quotes' worked on one 
specific point release due to a bug in model() in that release and is 
definitely not supported.



More information about the Catalyst mailing list