[Dbix-class] Custom SQL
goraxe at goraxe.me.uk
Mon Dec 14 16:09:42 GMT 2009
Where I have done this in the past
I have used DBIx::Class::ResultSource::View as the parent, and then load core
via load_components (in many cases it seems you need to load core last), then
set the __PACKAGE__->table_class, set a __PACKAGE->table to use as the
source name. I think you also need to set a __PACKAGE__->result_class to set how the
returned results should be blessed.
On Mon, Dec 14, 2009 at 04:04:41PM +0100, Bernhard Graf wrote:
> I'm trying to execute verbatim SQL as described in
> 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';
> ... 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.
> Bernhard Graf
> 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://firstname.lastname@example.org
More information about the DBIx-Class