[Bug 20566] New: Remove 'single' method from Koha::Objects
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20566 Bug ID: 20566 Summary: Remove 'single' method from Koha::Objects Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Database Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org We're exposing ourselves to terrible bugs which dbix::class goes to lengths to inform the developer about before they're added by circumventing the protections built into dbic here. By hard coding a 'rows => 1' into this method instead of just using the method from DBIC we are ensuring the developer will never be informed of their stupidity if they have not added any form or ordering to their database clauses. As such, the order of the results returned and as such the result of the 'single' call is now entirely random. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20566 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Hum? 188 sub single { 189 my ($self) = @_; 190 191 my $single = $self->_resultset()->single; 192 return unless $single; 193 194 return $self->object_class()->_new_from_dbic($single); 195 } -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20566 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|NEW |RESOLVED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org