Bug 31095: DBIC additions and relation name tweak
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
f0b37d3131
commit
ebb3eac6a1
|
|
@ -1268,7 +1268,7 @@ Returns the patron restrictions.
|
|||
|
||||
sub restrictions {
|
||||
my ($self) = @_;
|
||||
my $restrictions_rs = $self->_result->borrower_debarments;
|
||||
my $restrictions_rs = $self->_result->restrictions;
|
||||
return Koha::Patron::Restrictions->_new_from_dbic($restrictions_rs);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2061,6 +2061,13 @@ __PACKAGE__->many_to_many("permissions", "user_permissions", "permission");
|
|||
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-10 17:43:30
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5hh2lGCcKclyTnY7KNPkvg
|
||||
|
||||
__PACKAGE__->has_many(
|
||||
"restrictions",
|
||||
"Koha::Schema::Result::BorrowerDebarment",
|
||||
{ "foreign.borrowernumber" => "self.borrowernumber" },
|
||||
{ cascade_copy => 0, cascade_delete => 0 },
|
||||
);
|
||||
|
||||
__PACKAGE__->has_many(
|
||||
"extended_attributes",
|
||||
"Koha::Schema::Result::BorrowerAttribute",
|
||||
|
|
|
|||
|
|
@ -165,6 +165,11 @@ __PACKAGE__->belongs_to(
|
|||
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-08-19 17:53:04
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kDCkA7XrjKXlrFG5lk8Lgg
|
||||
|
||||
sub koha_objects_class {
|
||||
'Koha::Patron::Restrictions';
|
||||
}
|
||||
sub koha_object_class {
|
||||
'Koha::Patron::Restriction';
|
||||
}
|
||||
|
||||
# You can replace this text with custom code or comments, and it will be preserved on regeneration
|
||||
1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue