Bug 29290: Rename relationships borrower => patron

This is a trivial change that is required to be able to embed patron
objects in the (old) checkout object.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Tomás Cohen Arazi 2021-10-20 16:59:38 -03:00 committed by Jonathan Druart
parent 6ff32002da
commit d46492ac23
4 changed files with 4 additions and 4 deletions

View file

@ -102,7 +102,7 @@ Return the patron for who the checkout has been done
sub patron {
my ( $self ) = @_;
my $patron_rs = $self->_result->borrower;
my $patron_rs = $self->_result->patron;
return Koha::Patron->_new_from_dbic( $patron_rs );
}

View file

@ -69,7 +69,7 @@ Return the patron for who the checkout has been done
sub patron {
my ( $self ) = @_;
my $patron_rs = $self->_result->borrower;
my $patron_rs = $self->_result->patron;
return unless $patron_rs;
return Koha::Patron->_new_from_dbic( $patron_rs );
}

View file

@ -346,7 +346,7 @@ __PACKAGE__->add_columns(
);
__PACKAGE__->belongs_to(
"borrower",
"patron",
"Koha::Schema::Result::Borrower",
{ borrowernumber => "borrowernumber" },
{ join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },

View file

@ -315,7 +315,7 @@ __PACKAGE__->add_columns(
);
__PACKAGE__->belongs_to(
"borrower",
"patron",
"Koha::Schema::Result::Borrower",
{ borrowernumber => "borrowernumber" },
{ join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },