Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: How to do a DBIx subquery?

by nysus (Vicar)
on Mar 14, 2019 at 16:17 UTC ( #1231267=note: print w/replies, xml ) Need Help??


in reply to How to do a DBIx subquery?

I think I need to do a prefetch as illustrated here

I tried:

my $results = $s->results->find($id, { prefetch => ['metas'] } ); my $post_id = $results->_menu_item_object_id;

I just got an error, though: Can't locate object method "_menu_item_object_id" via package "WordPress::DBIC::Schema::Result::WpPost"

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1231267]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2019-06-26 00:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (108 votes). Check out past polls.

    Notices?