View | Details | Raw Unified | Return to bug 35287
Collapse All | Expand All

(-)a/Koha/ERM/Licenses.pm (-1 / +1 lines)
Lines 22-28 use Koha::Database; Link Here
22
22
23
use Koha::ERM::License;
23
use Koha::ERM::License;
24
24
25
use base qw(Koha::Objects Koha::Objects::Mixin::AdditionalFields);
25
use base qw(Koha::Objects::Mixin::AdditionalFields Koha::Objects);
26
26
27
=head1 NAME
27
=head1 NAME
28
28
(-)a/Koha/Objects/Mixin/AdditionalFields.pm (-1 / +24 lines)
Lines 2-7 package Koha::Objects::Mixin::AdditionalFields; Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use base qw(Koha::Objects::Mixin::ExtendedAttributes);
6
5
=head1 NAME
7
=head1 NAME
6
8
7
Koha::Objects::Mixin::AdditionalFields
9
Koha::Objects::Mixin::AdditionalFields
Lines 56-61 sub filter_by_additional_fields { Link Here
56
    return $class->search(\%conditions, { join => [ ('additional_field_values') x $idx ] });
58
    return $class->search(\%conditions, { join => [ ('additional_field_values') x $idx ] });
57
}
59
}
58
60
61
=head3 extended_attributes_config
62
63
=cut
64
65
sub extended_attributes_config {
66
    my ($self) = @_;
67
68
    my $tablename_query = $self->extended_attributes_tablename_query;
69
70
    return {
71
        'id_field'        => { 'foreign' => 'record_id', 'self' => $self->_resultset->result_source->primary_columns },
72
        'key_field'       => 'field_id',
73
        'schema_class'    => 'Koha::Schema::Result::AdditionalFieldValue',
74
    };
75
}
76
77
sub extended_attributes_tablename_query {
78
    my ($self) = @_;
79
80
    return { 'tablename' => $self->_resultset->result_source->name, 'operator' => '=' };
81
}
82
59
=head1 AUTHOR
83
=head1 AUTHOR
60
84
61
Koha Development Team <http://koha-community.org/>
85
Koha Development Team <http://koha-community.org/>
62
- 

Return to bug 35287