[Dbix-class] Should $rs->result_class end up on new results?
Bill Moseley
moseley at hank.org
Wed Jun 19 19:10:24 GMT 2013
(sorry, sent this to -devel list first in error)
Quick question:
my $rs =3D $schema->resultset( 'Artist' );
*$rs->result_class( 'DBIx::Class::ResultClass::HashRefInflator' );*
print "Artist before " . $rs->result_class . "\n";
$rs =3D $rs->search;
print "Artist after " . $rs->result_class . "\n";
Results in:
Artist before DBIx::Class::ResultClass::HashRefInflator
Artist after MyApp::Schema::Result::Artist
http://search.cpan.org/~ribasushi/DBIx-Class-0.08250/lib/DBIx/Class/ResultC=
lass/HashRefInflator.pmsays:
- Specify $rs->result_class on a specific resultset to affect only that
resultset (and any chained off of it); or
I'm confused by that language. Says "only that resultset" but also "and
any chained off it". Should the result_class be "sticky" and applied to
new resultsets?
-- =
Bill Moseley
moseley at hank.org
-- =
Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20130619/dc1=
9d02f/attachment.htm
More information about the DBIx-Class
mailing list