[Dbix-class] DBIx::Class:Schema::Loader has_many relationshipnames

Brandon Black blblack at gmail.com
Fri Feb 24 21:37:34 CET 2006


On 2/24/06, Adam Sjøgren <asjo at koldfront.dk> wrote:
> On Fri, 24 Feb 2006 20:13:32 +0000, Matt wrote:
>
> > my $car = $schema->resultset('Car')->find('Ford Focus');
>
> And in Catalyst it would be something like
> $c->model('DBIC')->resultset('Car')->find('Fiat Golf'), right?
>
> (I thought I read somewhere that $c->model('DBIC::Car')->find('...')
> would work [with D::C::S::Loader], but I haven't been able to make it
> do so. And I can't find it now. Hm.
>

Under Catalyst::Model::DBIC::Schema (regardless of whether the
underlying schema is a maual one, or one from
DBIx::Class::Schema::Loader), $c->model('Foo::Bar') returns
$c->model('Foo')->resultset('Bar'), and therefore your find example
should work.  If it doesn't, give me a test case or something like it
:)

-- Brandon



More information about the Dbix-class mailing list