Bug 18050: DBIC

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2020-11-13 21:15:16 +00:00
parent fee8aa2b1c
commit 610fab83e0
2 changed files with 43 additions and 5 deletions

View File

@ -88,6 +88,7 @@ __PACKAGE__->table("aqbudgets");
=head2 budget_period_id
data_type: 'integer'
is_foreign_key: 1
is_nullable: 1
=head2 sort1_authcat
@ -157,7 +158,7 @@ __PACKAGE__->add_columns(
is_nullable => 0,
},
"budget_period_id",
{ data_type => "integer", is_nullable => 1 },
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"sort1_authcat",
{ data_type => "varchar", is_nullable => 1, size => 80 },
"sort2_authcat",
@ -257,6 +258,26 @@ __PACKAGE__->has_many(
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 budget_period
Type: belongs_to
Related object: L<Koha::Schema::Result::Aqbudgetperiod>
=cut
__PACKAGE__->belongs_to(
"budget_period",
"Koha::Schema::Result::Aqbudgetperiod",
{ budget_period_id => "budget_period_id" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "CASCADE",
on_update => "CASCADE",
},
);
=head2 suggestions
Type: has_many
@ -298,8 +319,8 @@ Composing rels: L</aqbudgetborrowers> -> borrowernumber
__PACKAGE__->many_to_many("borrowernumbers", "aqbudgetborrowers", "borrowernumber");
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-07-16 13:50:45
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zB7ox8a4KdDGq5fsbQfLGQ
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-11-13 21:13:32
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3u8RuxkSI5UJ4flK6hd64w
sub koha_object_class {

View File

@ -110,9 +110,26 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key("budget_period_id");
=head1 RELATIONS
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M13qdhmXgKilais2IFkXFw
=head2 aqbudgets
Type: has_many
Related object: L<Koha::Schema::Result::Aqbudget>
=cut
__PACKAGE__->has_many(
"aqbudgets",
"Koha::Schema::Result::Aqbudget",
{ "foreign.budget_period_id" => "self.budget_period_id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-11-13 21:13:31
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p6UiISYUsUEUCjez7AJzRQ
sub koha_object_class {
'Koha::Acquisition::Budget';