Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: list DBIX::Class many_to_many relations

by chrestomanci (Priest)
on Dec 18, 2010 at 21:25 UTC ( #877802=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Schema::Document;
    use base 'DBIx::Class::Core';
    ...
    __PACKAGE__->set_primary_key('id');
    __PACKAGE__->belongs_to('document' => 'Schema::Document_Author');
    __PACKAGE__->belongs_to('author'   => 'Schema::Document_Author');
    
  2. or download this
    my $authorsInYear_RS = $schema->resultset('Author')->search({
        'document.document_id' => { 'IN'  =>  $doc_ids->as_query()  },
    ...
    {
        prefetch => { document_authors => 'document' }
    });
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2023-06-04 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (22 votes). Check out past polls.

    Notices?