[Koha-bugs] [Bug 13019] Add base classes on which to build Koha objects

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Oct 27 10:59:20 CET 2014


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

--- Comment #19 from M. de Rooy <m.de.rooy at rijksmuseum.nl> ---
Some questions after looking at the code:

Clean code on itself, still needs more documentation. 
Is the idea now to allow DBIC methods ONLY in Koha::Object and Objects? This is
currently not achieved if you need to pass in a resultset.
Do we enforce its use in order to prevent chaos? This means creating a lot of
new modules rightaway..

Having new and new_from_dbic was qualified above somewhere as a good idea. Why?
I would merge them. Let new figure out what it receives. [If you want to
encapsulate dbic btw, do not use that name when constructing your object.]
Instead of passing the resultset, you could add a find method in the object
class or implement the same via the new constructor. Something like:
my $borrower= Koha::Borrower->find( $number );
or:
my $borrower= Koha::Borrower->new( $number );
New c/should see that this is different from passing { number => .., name =>
..}

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


More information about the Koha-bugs mailing list