http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13019

--- Comment #26 from M. de Rooy <[email protected]> ---
(In reply to Jonathan Druart from comment #25)
Please be assured that I appreciate your work and eagerness to get things into
Koha. I also know that it can be somewhat frustrating to see things develop
rather slow. Since this is meant to be a very fundamental object, I would not
recommend hurry here btw.

> Yes of course. We will only add methods in Koha::Object[s] if needed and
> make sense.
This sounds like a misunderstanding. If it would be so obvious to not have DBIx
code in a perl script (or unit test!), why does Borrower.t contain constructs
like: 
my $borrower = Koha::Database->new()->schema()->resultset('Borrower')->find(
$borrowernumber );

Just replace it by something like Koha::Borrower->find( $borrowernumber ) or
even extend new with similar functionality, as commented before. This would
make new_from_dbic as external method (!! -- could be private though with an
underscore) and passing resultsets superfluous. Leave the result set stuff in
the objects.

Also note that Koha::Borrowers->new()->find is not really elegant. Why not
offer both Koha::Borrower->find and Koha::Borrowers->find without going through
new?

With some minimal changes in that direction, I would be inclined to pass qa..

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to