in reply to Re: DBIx::Class::ResultSet disired hash output including related items
in thread DBIx::Class::ResultSet desired hash output including related items
I have tried something like the following,
my $artists = $schema->resultset('Artist') ; # $artists->result_class ('DBIx::Class::ResultClass::HashRefInflator'); # will cause errors my $artistAndTitles = $artists->next->cds() ; $artistAndTitles->result_class ('DBIx::Class::ResultClass::HashRefInflator'); while (my $hashref = $artistAndTitles->next) { print Dumper($hashref) ; }
But this way I only get a 'shallow' hash from the 'cds' result subset for only one row at a time instead of each Artist + all the titles.
Maybe there is another way? Examples appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: DBIx::Class::ResultSet disired hash output including related items
by spadacciniweb (Curate) on Feb 26, 2019 at 15:39 UTC | |
by Veltro (Hermit) on Feb 26, 2019 at 16:27 UTC | |
by Your Mother (Archbishop) on Feb 26, 2019 at 16:50 UTC | |
by Veltro (Hermit) on Feb 27, 2019 at 08:37 UTC |