|
|
| more useful options | |
| PerlMonks |
Issues with DBIx::Classby LittleJack (Beadle) |
| on Mar 23, 2022 at 03:57 UTC ( [id://11142301]=perlquestion: print w/replies, xml ) | Need Help?? |
|
LittleJack has asked for the wisdom of the Perl Monks concerning the following question: I don't know if I'm misunderstanding something fundamental here, but here's the situation: I have a module: package Model::DB::Result::Thing; and it looks basically like this: and Model::DB is just
All the other parts of my codebase (a legacy Catalyst App) seem happy with it, and I can do some things with it which show that it's connecting to the DB correctly, see below. What I can't do it seems is get a simple set of results back with all() or search() What I'm expecting, as per this page https://metacpan.org/release/RIBASUSHI/DBIx-Class-0.082841/view/lib/DBIx/Class/ResultSet.pm is that I do my $thing_rs = $c->model('DB::Thing')->all(); but when I do that and use Data::Dumper I get an integer, the number of rows: $VAR1 = 123; So I try calling in list context: my @thing_rs = $c->model('DB::Thing')->all(); and I get $VAR1 as the whole MyApp::Model::DB::Thing object, followed by 123 blessed objects like this:
What I'm expecting is an array of hashes containing what I see there in the blessed objects, i.e.
So I'm kind of stumped. Is something different because it's PostGres? Is my version of DBIxC (0.082840) weird? TIA Monks!
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||||||