[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Jun 3 10:03:56 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697
--- Comment #46 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
(In reply to Marcel de Rooy from comment #44)
> See also IRC
>
> - my $marcrecord = C4::Biblio::GetMarcBiblio({ biblionumber =>
> $biblionumber });
> + my $biblio = Koha::Biblios->find($biblionumber);
> + my $marcrecord = $biblio->metadata->record;
>
> This is a general pattern for most of the changes.
> Do you have performance figures ?
>
> In some cases we did NOT look up the biblio before!
Still from IRC
09:59 <@Joubu> Koha::Biblio::Metadatas->search({ biblionumber => 42 })->next
09:59 <@Joubu> then ->record
09:59 <@Joubu> You will assume that there is only one row (per record) in the
table
10:01 < marcelr> assumptions are generally dangerous :)
10:01 <@Joubu> actually Koha::Biblio::Metadatas->find({ biblionumber => 42,
format => 'marcxml', schema => C4::Context->preference('marcflavour') })
10:01 <@Joubu> that's getting messy a bit
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list