Hi all,

In case anyone else has the issue of "Can't find source for XXX", my solution 
was to correct
the value of source_name.

I was specifying source_name in my Result class pkg to be the table name in the 
After looking at the code in DBIx::Class::Schema and the POD documentation, it 
seems that source_name should be the
final part of the class name for the corresponding Result for that table.

Once I changed the value of source_name, the query worked fine, returning all 
the expected data.

In my example, the change was:

package X::Y::Z::Result::Table1;
use base qw(DBIx::Class::Core);

... other Perl statements (strict, warnings, etc.)

__PACKAGE__->source_name('Table1');                              <--- table1 
changed to Table1

... Accessor statements


In my codebase, X::Y::Z represents the nested namespaces in the existing 
(large) Apache codebase that I am adding
DBIx functionality.

Thanks and regards,


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/dbix-class@lists.scsys.co.uk

Reply via email to