From 5216222f758be04d19cdd1c462654947e41b2ffc Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 14 Oct 2013 21:35:11 +0000 Subject: [PATCH] Bug 10565: (follow-up) refresh DBIC schema class files Signed-off-by: Galen Charlton --- Koha/Schema/Result/Borrower.pm | 34 ++++++++++++++++- Koha/Schema/Result/PatronList.pm | 51 +++++++++++++++++--------- Koha/Schema/Result/PatronListPatron.pm | 31 ++++++++++++---- 3 files changed, 88 insertions(+), 28 deletions(-) diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm index 3fe43624e6..9ddc63bfce 100644 --- a/Koha/Schema/Result/Borrower.pm +++ b/Koha/Schema/Result/Borrower.pm @@ -801,6 +801,36 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 patron_list_patrons + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "patron_list_patrons", + "Koha::Schema::Result::PatronListPatron", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + +=head2 patron_lists + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "patron_lists", + "Koha::Schema::Result::PatronList", + { "foreign.owner" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 patroncards Type: has_many @@ -1002,8 +1032,8 @@ Composing rels: L -> course __PACKAGE__->many_to_many("courses", "course_instructors", "course"); -# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RTqzsubViQ3dHnXCUKqgNg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 21:34:14 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MW1ML4Sc1swrZCYxL/yMzA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/PatronList.pm b/Koha/Schema/Result/PatronList.pm index 8d1d9dc471..3864f130a3 100644 --- a/Koha/Schema/Result/PatronList.pm +++ b/Koha/Schema/Result/PatronList.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::PatronList; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::PatronList + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::PatronList +=head1 TABLE: C =cut @@ -47,24 +51,20 @@ __PACKAGE__->add_columns( "owner", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, ); -__PACKAGE__->set_primary_key("patron_list_id"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 patron_list_patrons +=over 4 -Type: has_many +=item * L -Related object: L +=back =cut -__PACKAGE__->has_many( - "patron_list_patrons", - "Koha::Schema::Result::PatronListPatron", - { "foreign.patron_list_id" => "self.patron_list_id" }, - { cascade_copy => 0, cascade_delete => 0 }, -); +__PACKAGE__->set_primary_key("patron_list_id"); + +=head1 RELATIONS =head2 owner @@ -78,12 +78,27 @@ __PACKAGE__->belongs_to( "owner", "Koha::Schema::Result::Borrower", { borrowernumber => "owner" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 patron_list_patrons + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "patron_list_patrons", + "Koha::Schema::Result::PatronListPatron", + { "foreign.patron_list_id" => "self.patron_list_id" }, + { cascade_copy => 0, cascade_delete => 0 }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-07-10 10:39:50 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XegvNUkfR/cYwxlLLX3h3A +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 21:34:14 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iWNlXRM+XvkJMlnu4F0xKw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/PatronListPatron.pm b/Koha/Schema/Result/PatronListPatron.pm index cb7ee6b4bc..441d7a443c 100644 --- a/Koha/Schema/Result/PatronListPatron.pm +++ b/Koha/Schema/Result/PatronListPatron.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::PatronListPatron; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::PatronListPatron + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::PatronListPatron +=head1 TABLE: C =cut @@ -47,6 +51,17 @@ __PACKAGE__->add_columns( "borrowernumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("patron_list_patron_id"); =head1 RELATIONS @@ -63,7 +78,7 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 patron_list @@ -78,12 +93,12 @@ __PACKAGE__->belongs_to( "patron_list", "Koha::Schema::Result::PatronList", { patron_list_id => "patron_list_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-07-10 10:39:50 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:c+znpWBlv6I+yi1EuGUKrQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 21:34:14 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0gmBJbxnHkobBAazvKnY7g # You can replace this text with custom content, and it will be preserved on regeneration -- 2.39.2