[Dbix-class] Custom SQL

Bernhard Graf dbic4 at augensalat.de
Mon Dec 14 15:04:41 GMT 2009


I'm trying to execute verbatim SQL as described in
http://search.cpan.org/~frew/DBIx-Class-0.08115/lib/DBIx/Class/Manual/Cookbook.pod#Arbitrary_SQL_through_a_custom_ResultSource
but it doesn't work.

Actually if I reduce the Cookbook example to the absolute minimum ...


  package My::Schema::Result::MyRequest;

  use parent 'DBIx::Class::Core';

  __PACKAGE__->table_class('DBIx::Class::ResultSource::View');

  __PACKAGE__->result_source_instance->is_virtual(1);

  1;


... I get the following error:

Can't locate object method "result_source_instance" via package
"My::Schema::Result::MyRequest" at My/Schema/Result/MyRequest.pm line 7.

Ideas?

Bernhard Graf



More information about the DBIx-Class mailing list