View | Details | Raw Unified | Return to bug 32894
Collapse All | Expand All

(-)a/Koha/Item.pm (-9 / +2 lines)
Lines 1622-1636 Returns the items associated with this bundle Link Here
1622
sub bundle_items {
1622
sub bundle_items {
1623
    my ($self) = @_;
1623
    my ($self) = @_;
1624
1624
1625
    if ( !$self->{_bundle_items_cached} ) {
1625
    my $rs = $self->_result->bundle_items;
1626
        my $bundle_items = Koha::Items->search(
1626
    return Koha::Items->_new_from_dbic($rs);
1627
            { 'item_bundles_item.host' => $self->itemnumber },
1628
            { join                     => 'item_bundles_item' } );
1629
        $self->{_bundle_items}        = $bundle_items;
1630
        $self->{_bundle_items_cached} = 1;
1631
    }
1632
1633
    return $self->{_bundle_items};
1634
}
1627
}
1635
1628
1636
=head3 is_bundle
1629
=head3 is_bundle
(-)a/Koha/Schema/Result/Item.pm (-1 / +3 lines)
Lines 982-987 __PACKAGE__->has_many( Link Here
982
  }
982
  }
983
);
983
);
984
984
985
# Relationship with bundled items
986
__PACKAGE__->many_to_many( bundle_items => 'item_bundles_hosts', 'item' );
987
985
__PACKAGE__->might_have(
988
__PACKAGE__->might_have(
986
  "last_returned_by",
989
  "last_returned_by",
987
  "Koha::Schema::Result::ItemsLastBorrower",
990
  "Koha::Schema::Result::ItemsLastBorrower",
988
- 

Return to bug 32894