[Koha-bugs] [Bug 18862] Some DBIx relations from issues table do not seem to work

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 28 12:05:34 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18862

--- Comment #2 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Found it:

Issue.pm contains:

sub item {
    my ( $self ) = @_;
    my $item_rs = $self->_result->item;
    return Koha::Item->_new_from_dbic( $item_rs );
}

and 

sub patron {
    my ( $self ) = @_;
    my $patron_rs = $self->_result->borrower;
    return Koha::Patron->_new_from_dbic( $patron_rs );
}

So we need to use patron instead of borrower.
Instead of adding item, patron, branch etc. subs all over the place, we
probably do better in checking these relations in the AUTOLOAD too.
Will try something here.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list