https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25044 Bug ID: 25044 Summary: No need to define koha_object[s]_çlass for standard object class names Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 24356 In Koha::Object[s]->prefetch_whitelist, there is a call to the koha_object[s]_class DBIC resultset class. We should not, otherwise those 2 methods will have to be defined all the time, even when we can guess it easily. Koha::Item <> Schema::Result::Item => standard Koha::Acquisition::Order <> Schema::Result::Aqorder => non-standard sub _get_object_class { my ( $type ) = @_; return unless $type; if( $type->can('koha_object_class') ) { return $type->koha_object_class; } $type =~ s|Schema::Result::||; return ${type}; } Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24356 [Bug 24356] objects.search prefetch -- You are receiving this mail because: You are watching all bug changes.