Tommy Butler wrote: > Friends, > > I'm having serious pains getting DBIx::Class to JOIN on anything. I'm > dealing with one situation in particular, but my problems are not > limited to this. I'd like to learn how to fix this one problem so I can > go on to fix others. In the description of my problem I will provide > the SQL query (which works), the DBIx::Class code call (which doesn't > work), and the schemata that correctly correspond to my database tables. > > Could someone provide some insight or a few lines of working code for > the query I'm trying to make? Your help is so much appreciated. I am > very confident that my attempts, including the example I provide here, > are very far from correct. > > (The Problem) ================================================= > The query below seems very straightforward no? And yet in DBIx::Class > it has become an insurmountable chore for me. I've spent more time > fiddling around with this specific issue than I'd ever admit. Following > the official documentation has only led to more and more confusion. =>( > http://search.cpan.org/~ribasushi/DBIx-Class-0.08103/lib/DBIx/Class/Manual/Joining.pod#USING_JOINS > ). I'm now asking for help at PerlMonks.org and on the DBIx::Class > mailing list. > > (The Query) ================================================== > select * from users join user_roles on (user_roles. user_id = id) join > roles on (roles.id = role_id) where username like '%foo%'; > > (The Perl Code) ================================================= > #You may well note from my code below that my use of DBIx::Class is > through the Catalyst framework. > # The code below fails with a very long stack trace which basically says > that my SQL syntax is wrong.
^^ we need at least the beginning of this stack trace, so we can see what the actual error is _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[email protected]
