[Koha-bugs] [Bug 34360] [WARN] DBIx::Class::ResultSetColumn::new(): Attempting to retrieve non-unique column 'biblionumber' on a resultset containing one-to-many joins will return duplicate results

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jan 11 13:14:08 CET 2024


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

Nick Clemens <nick at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick at bywatersolutions.com

--- Comment #6 from Nick Clemens <nick at bywatersolutions.com> ---
I added a patch, however, I noted a new error:
DBIx::Class::ResultSet::_construct_results(): Unable to properly collapse
has_many results in iterator mode due to order criteria - performed an eager
cursor slurp underneath. Consider using ->all() instead at
/kohadevbox/koha/Koha/Objects.pm line 317

Maybe that's a new bug? Surely related to the branchtransfers fetch, see bug
35100


I wonder on this one though, do we need to automagically decide how to sort? 

In the contexts where we use this we are looking at a specific biblio - could
we put the onus on the caller to pass in the biblio serial column? 

Every call is using: $biblio->items->search_ordered() so we have the biblio.
There is one exception in opac-detail.pl, however, it could be rewritten to use
the 'host_items' option

Suggesting:
$biblio->items({search criteria})->search_ordered({ serial => $biblio->serial,
other params},{});

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


More information about the Koha-bugs mailing list