Bug 29495: Add DBIC relationships back into Schema

This patch adds the relationship accessors back into the affected Schema
classes, now below the fold so they are retained during dbic rebuilds.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 1a25da1708)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
This commit is contained in:
Martin Renvoize 2021-11-17 10:10:18 +00:00 committed by Victor Grousset/tuxayo
parent a17902e1c5
commit ed4217c310
3 changed files with 66 additions and 0 deletions

View File

@ -336,6 +336,21 @@ __PACKAGE__->belongs_to(
},
);
=head2 return_claim
Type: might_have
Related object: L<Koha::Schema::Result::ReturnClaim>
=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';
}

View File

@ -307,6 +307,21 @@ __PACKAGE__->belongs_to(
},
);
=head2 return_claim
Type: might_have
Related object: L<Koha::Schema::Result::ReturnClaim>
=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';
}

View File

@ -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<Koha::Schema::Result::Issue>
=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<Koha::Schema::Result::OldIssue>
=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';
}