morgon has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to use a custom resultset and I am getting this error:
DBIx::Class::Schema::throw_exception(): Can't locate object method "result_source_instance" via package ...
Here is what the documentation says for such cases:
My class is as simple as it can be (bascially a copy from the Cookbook-example) and is syntactically valid.Can't locate method result_source_instance For some reason the table class in question didn't load fully, so the +ResultSource object for it hasn't been created. Debug this class in i +solation, then try loading the full schema again.
So how can I "Debug this class in isolation"?
What does that mean? What can I do to isolate the problem (I assume the Cookbook examples are tested or is it possible that they don't work anymore?).
Many thanks!
Update:
Here my class:
package TA::CP::DB::Schema::Result::CustomTest; use strict; use warnings; use base qw/DBIx::Class::Core/; __PACKAGE__->table_class('DBIx::Class::ResultSource::View'); __PACKAGE__->result_source_instance->is_virtual(1); __PACKAGE__->result_source_instance->view_definition(\"select 2*2");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBIx::Class problem
by Khen1950fx (Canon) on Jan 25, 2011 at 00:18 UTC | |
by morgon (Priest) on Jan 26, 2011 at 02:12 UTC |