method display () {
my $rs = $self->search({});
- $rs->result_class('DBIx::Class::ResultClass::HashRefInflator');
+# $rs->result_class('DBIx::Class::ResultClass::HashRefInflator');
+ $rs->result_class('DBIx::Class::WithMetaData::Inflator');
my @rows;
- foreach my $row ($rs->all) {
+ foreach my $row_rep ($rs->all) {
+ my ($row, $row_obj) = @{$row_rep};
# THIS BLOCK IS DEPRECATED
if (my $info = $self->row_info_for(id => $self->_mk_id(row => $row))) {
$row = { %{$row}, %{$info} };
--- /dev/null
+package DBIx::Class::WithMetaData::Inflator;
+
+use strict;
+use warnings;
+use Moose;
+extends 'DBIx::Class::ResultClass::HashRefInflator';
+
+around inflate_result => sub {
+ my $orig = shift;
+ my $self = shift;
+
+ my $hash = $self->$orig(@_);
+
+ my ($source, @rest) = @_;
+ my $row = $source->result_class->inflate_result(@_);
+ warn $row;
+ warn $self;
+ return [$hash, $row];
+};
+
+1;