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' }
    });