http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13851
Olli-Antti Kivilahti <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #22 from Olli-Antti Kivilahti <[email protected]> --- Hi there! Tomás asked me to comment on this. I have nothing major to complain, all looks good to me. I spotted one optimization however: +++ b/Koha/Hold.pm +sub biblio { + my ($self) = @_; + + $self->{_biblio} ||= Koha::Biblios->find( $self->biblionumber() ); + + return $self->{_biblio}; +} When you get the linked object like this 'Koha::Biblios->find()', you need to instantiate a new DBIx::Class::ResultSet to make the search. There is already an instantiated resultset in Koha::Hold (the caller class). Should we instead get the linked data like this? #The relationship is already defined in the DBIx::Schema my $b = $self->_resultset()->biblio() $b = $self->_new_from_dbic($b); using the DBIx::Schema's preconfigured relationships? -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
