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

Nilson Santos Figueiredo Junior acid06 at gmail.com
Tue Jul 25 04:15:12 CEST 2006


On 7/24/06, Dennis Daupert <ddaupert at sbcglobal.net> wrote:
> I have a number of tables that contain foreign keys to other tables;
> I need to be able to do selects on multiple tables, specifying
> particular columns in particular tables.

If you define your relationships correctly you should be able to
accomplish this using "prefetch" and/or "join" conditions.

You can see usage examples in DBIx::Class::Manual::Cookbok
(http://search.cpan.org/~mstrout/DBIx-Class-0.07000/lib/DBIx/Class/Manual/Cookbook.pod).

If you don't know how to define your relationships, you should take a
look at DBIx::Class::Manual::Intro and other related docs.

-Nilson Santos F. Jr.



More information about the Catalyst mailing list