[Koha-bugs] [Bug 22407] OMNIBUS: Use DBIC relations to fetch related object rather than searching for the object

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Apr 13 14:43:00 CEST 2019


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

--- Comment #10 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Martin Renvoize from comment #9)
> This has me wondering.. we're often renaming relationships within
> Koha::Objects (understandably as often our db derived ones are horrible
> because of poor initial db design).  Should this guideline also introduce a
> requirement to match the relation name in the dbic class up to the relation
> name in the Koha::Object?  It wouldn't be hard to add relations with such
> names and would lead to cleaner, easier to guess, prefetch strings.

I'm all for renaming relations like you say. I've tried myself to (a) migrate
some methods into matching this guideline and (b) use it in a real life
scenario and can say the only uncomfortable step was (b), due to the relation
naming issues. See bug 22696.

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


More information about the Koha-bugs mailing list