[Catalyst] How do you structure multi-table DBIx queries?

Dennis Daupert ddaupert at sbcglobal.net
Wed Jul 26 04:00:20 CEST 2006


Matt Trout said:
> Read through ... DBIx::Class documentation... ... Manual::*...
> ...ResultSet docs... ...SQL::Abstract for the WHERE clause

When faced with a mountain of info, I usually read multiple times. RTFM is always good advice ;-) Focused RTFM is even better. The specifics you've outlined will help me separate the signal from the (for this context) noise. I had bypassed ResultSet a couple weeks ago, feeling I wasn't quite ready yet. By this time, I've absorbed enough example code that when I had a look today, much more of it makes sense. It also happens I just printed SQL::Abstract Saturday. I will spend time with it.

> Something like $c->model('DB::Quotes')->search($where, 
>{ prefetch => [ qw/category user/ ] }) 
> should cause it to retrieve the data in a single query

When faced with a mountain of info it's really useful to have some clear direction. Thanks for the direction. I'll go quiet now for awhile, curl up with some good docs, give the list a break ;-) 

best,

/dennis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060725/399e0f00/attachment.htm 


More information about the Catalyst mailing list