[Koha-bugs] [Bug 36317] Koha::Biblio->host_items fails with search_ordered()

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Mar 18 15:33:50 CET 2024


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

--- Comment #10 from Fridolin Somers <fridolin.somers at biblibre.com> ---
Working on this I learned that DBIx combines several searches into one :
  Koha::Items->search( { itemnumber => 123 } )->search( {}, { join =>
'branchtransfers' } );
Will give only one SQL query : 
  SELECT * FROM items JOIN branchtransfers USING itemnumber WHERE
itemnumber='123'

So we should always use explicit "me" :
  Koha::Items->search( { "me.itemnumber" => 123 } )->search( {}, { join =>
'branchtransfers' } );

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


More information about the Koha-bugs mailing list