[Koha-bugs] [Bug 28871] Koha::Objects->empty doesn't work correctly in list context

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Aug 20 12:08:36 CEST 2021


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

--- Comment #12 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Marcel de Rooy from comment #9)
> BTW It seems to me that we do not even need to do a search, just create a
> resultset with new only. But this is merely a theoretical difference. There
> will be no db read since we set the cache.
> 
> #    $self = $self->search(\'0 = 1');
>     $self->_resultset()->set_cache([]);

That ->search call will not trigger a db search. That's correct. It was added
so further chaining always returns ah empty set.

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


More information about the Koha-bugs mailing list