diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm index 3b7c6105d8..b8e49085f0 100644 --- a/Koha/Schema/Result/Issue.pm +++ b/Koha/Schema/Result/Issue.pm @@ -336,6 +336,21 @@ __PACKAGE__->belongs_to( }, ); +=head2 return_claim + +Type: might_have + +Related object: L + +=cut + +__PACKAGE__->might_have( + "return_claim", + "Koha::Schema::Result::ReturnClaim", + { "foreign.issue_id" => "self.issue_id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + sub koha_object_class { 'Koha::Checkout'; } diff --git a/Koha/Schema/Result/OldIssue.pm b/Koha/Schema/Result/OldIssue.pm index f39389a49a..bc7dae3603 100644 --- a/Koha/Schema/Result/OldIssue.pm +++ b/Koha/Schema/Result/OldIssue.pm @@ -307,6 +307,21 @@ __PACKAGE__->belongs_to( }, ); +=head2 return_claim + +Type: might_have + +Related object: L + +=cut + +__PACKAGE__->might_have( + "return_claim", + "Koha::Schema::Result::ReturnClaim", + { "foreign.issue_id" => "self.issue_id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + sub koha_object_class { 'Koha::Old::Checkout'; } diff --git a/Koha/Schema/Result/ReturnClaim.pm b/Koha/Schema/Result/ReturnClaim.pm index fb2e95378f..b554aebea1 100644 --- a/Koha/Schema/Result/ReturnClaim.pm +++ b/Koha/Schema/Result/ReturnClaim.pm @@ -256,6 +256,42 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-23 19:37:50 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3V5bUmu5W3+XS0fa8uR04w +=head2 issue + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "issue", + "Koha::Schema::Result::Issue", + { issue_id => "issue_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + }, +); + +=head2 old_issue + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "old_issue", + "Koha::Schema::Result::OldIssue", + { issue_id => "issue_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + }, +); + sub koha_objects_class { 'Koha::Checkouts::ReturnClaims'; }