From d46492ac234cb00028618bd46f623c5243d627b6 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 20 Oct 2021 16:59:38 -0300 Subject: [PATCH] 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 Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- Koha/Checkout.pm | 2 +- Koha/Old/Checkout.pm | 2 +- Koha/Schema/Result/Issue.pm | 2 +- Koha/Schema/Result/OldIssue.pm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Koha/Checkout.pm b/Koha/Checkout.pm index cc00194248..6dd98ca3e2 100644 --- a/Koha/Checkout.pm +++ b/Koha/Checkout.pm @@ -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 ); } diff --git a/Koha/Old/Checkout.pm b/Koha/Old/Checkout.pm index 3cfc30aa6f..441cc7d27d 100644 --- a/Koha/Old/Checkout.pm +++ b/Koha/Old/Checkout.pm @@ -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 ); } diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm index 7b4091eead..9fa5c535d6 100644 --- a/Koha/Schema/Result/Issue.pm +++ b/Koha/Schema/Result/Issue.pm @@ -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" }, diff --git a/Koha/Schema/Result/OldIssue.pm b/Koha/Schema/Result/OldIssue.pm index 7d37600caf..83c6db0a21 100644 --- a/Koha/Schema/Result/OldIssue.pm +++ b/Koha/Schema/Result/OldIssue.pm @@ -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" }, -- 2.39.5