@@ -, +, @@ --- Koha/Schema/Result/Issue.pm | 15 +++++++++++++ Koha/Schema/Result/OldIssue.pm | 15 +++++++++++++ Koha/Schema/Result/ReturnClaim.pm | 36 +++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) --- a/Koha/Schema/Result/Issue.pm +++ a/Koha/Schema/Result/Issue.pm @@ -373,6 +373,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'; } --- a/Koha/Schema/Result/OldIssue.pm +++ a/Koha/Schema/Result/OldIssue.pm @@ -343,6 +343,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'; } --- a/Koha/Schema/Result/ReturnClaim.pm +++ a/Koha/Schema/Result/ReturnClaim.pm @@ -280,6 +280,42 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-11-17 10:01:24 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ik93SD3kLNecIyRgsBVKDQ +=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'; } --