[Dbix-class] Left join on multiple columns

John Goulah jgoulah at gmail.com
Fri May 18 20:46:45 GMT 2007


On 5/18/07, Guillermo Roditi <groditi at gmail.com> wrote:
>
> Correction, you want to add it to the ResultSet class, not the result
> class! and yes there's a way.
>
> http://search.cpan.org/~blblack/DBIx-Class/lib/DBIx/Class/Manual/Cookbook=
.pod#Predefined_searches
>
> <http://search.cpan.org/%7Eblblack/DBIx-Class/lib/DBIx/Class/Manual/Cookb=
ook.pod#Predefined_searches>
>
>
> http://search.cpan.org/~jrobinson/DBIx-Class-0.07999_02/lib/DBIx/Class/St=
orage/DBI.pm<http://search.cpan.org/%7Ejrobinson/DBIx-Class-0.07999_02/lib/=
DBIx/Class/Storage/DBI.pm>
>
> $self->result_source->schema->storage





That makes sense, but for some reason when I follow the example it wont let
me start my server.  I create a directory under myDB called ResultSet, and
put an object call TestRes.pm in there which contains:

package myDB::ResultSet::TestRes;

use strict;
use warnings;
use base 'DBIx::Class::ResultSet';

1;


and when I try to start the catalyst server I get:

Couldn't instantiate component "MyApp::Model::myDB", "Cannot load schema
class 'myDB': Can't locate object method "source_name" via package
"myDB::ResultSet::TestRes" at
/usr/local/share/perl/5.8.8/DBIx/Class/Schema.pm line 280.
Compilation failed in require at
/usr/local/share/perl/5.8.8/Catalyst/Model/DBIC/Schema.pm line 272.

>From searching the web it says to check the other classes mentioned in the
error, all of which compile fine, and if I move the ResultSet folder out of
my app, things are fine.  Pulling at straws, I defined a method called
source_name, which then just leads the compiler to throw another error.


Any Ideas?

Thanks!
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20070518/f26=
632c9/attachment-0001.htm


More information about the Dbix-class mailing list