[Dbix-class] joins -- Can't Handle this Yet?

Cory Watson jheephat at gmail.com
Tue Oct 28 21:43:56 GMT 2008


On 10/28/08, Brandi Cantarel <b.cantarel at gmail.com> wrote:
> I would like to join 2 tables using DBIx::Class but I get this error:
>
> Can't handle this yet :(
>
> when my starting table "belongs" to the second table??  I don't
> understand, can I only join starting from tables where that table is
> the owner of the primary key from which to join?  I would actually
> like to join many tables and would like to start the join with this
> "belongs_to" table as I would if I were using simple DBI.
>
> There is a one to one relationship between the two tables I would
> like to join.
>
>
> BTW, does anyone know how to "print" the SQL the program is
> producing.  Sometimes I get errors and I feel like looking at the
> actual SQL would help alot.


Hi Brandi,

I think you might want to take a look at the DBIx::Class Cookcook:

http://search.cpan.org/perldoc?DBIx::Class::Manual::Cookbook

The "JOINS AND PREFETCHING" and "DEBUGGING AND PROFILING" sections
should get you going in the right direction!

-- 
Cory 'G' Watson
http://www.onemogin.com



More information about the DBIx-Class mailing list