Bug 31095: DBIC additions and relation name tweak

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomas Cohen Arazi 2023-01-30 12:57:32 -03:00
parent f0b37d3131
commit ebb3eac6a1
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
3 changed files with 14 additions and 2 deletions

View File

@ -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);
}

View File

@ -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",

View File

@ -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;