http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13851 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |olli-antti.kivilahti@jns.fi --- Comment #22 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- 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.