[Catalyst] Catalyst 5.7012
Malcolm
mjh-lists-catalyst at liminalflux.net
Mon Dec 24 15:05:31 GMT 2007
On Monday 24 December 2007, Jonathan Rockway wrote:
> On Mon, 2007-12-24 at 13:57 +0000, Anthony Gardner wrote:
> > but the same happens with $c->model('Person')->all()
> > plus the docs have ........
> > $c->model('MyAppDB::Book')->all
> > TIP: You may see the $c->model('MyAppDB::Book') used above written as
> > $c->model('MyAppDB')->resultset('Book). The two are equivalent. Maybe I
> > should just take a break now for crimbo!!
> You named your model Person, not TestAppDB. So you can say
> $c->model('Person::Person')->all or
> $c->model('Person')->resultset('Person')->all. Not any of the things
> you put in your code.
> Anyway, I highly suggest you rename your model to TestAppDB, because
> then you won't be as confused.
Having just spent a while struggling with the same issue I found the docs for
Catalyst::Model::DBIC::Schema were helpful in wrapping my mind around what
went where and how to name things. (The documentation even has exactly the
same issue for one of it's example classes in the synopsis: 'Actor' is
correct, 'Role' is incorrect).
More information about the Catalyst
mailing list