[Dbix-class] Can't locate object method "result_source_instance"

Alex Chen jiaming.chen at ehealth-china.com
Sat Feb 11 07:30:11 CET 2006


Greeting,
    I found an weird error, it worked well, and I don't think I change anything, but now it tells me following errors found. How could I resolve it?
    Can't locate object method "result_source_instance" via package "My::Schema::CustomerFieldTrackExt" at /usr/lib/perl5/site_perl/5.8.6/DBIx/Class/Schema.pm line 68.
    Compilation failed in require at test.pl line 2.
    BEGIN failed--compilation aborted at test.pl line 2.

Thanks
Alex Chen

[code snippet]
package My::Schema;
use base qw/DBIx::Class::Schema/;

  # load My::Schema::Foo, My::Schema::Bar, My::Schema::Baz
  __PACKAGE__->load_classes(qw/CustomerFieldTrackExt/);
1;
~


package My::Schema::CustomerFieldTrackExt;
use base qw /DBIx::Class/;
__PACKAGE__->load_components(qw/PK::Auto::Pg core/);
__PACKAGE__->table('CustomerFieldTrackExt');
__PACKAGE__->add_columns(qw/ProjectID BugID  Desc_Custom_2/);
__PACKAGE__->set_primary_key('BugID');

1;


#!/usr/bin/perl
use My::Schema;
my $dsn="dbi:ODBC:DSN";
my $user="user";
my $password="pwd";
my %attrs={AutoCommit=>1};
my $schema = My::Schema->connect( $dsn, $user, $password,\%attrs );
my $rs= $schema->resultset('CustomerFieldTrackExt')->search({Desc_Custom_2=>50846});

while ( my $id = $rs->next){
        print $id->BugID,"\n";
}
~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/dbix-class/attachments/20060211/a7dc075e/attachment.htm


More information about the Dbix-class mailing list