Bug 10565: (follow-up) refresh DBIC schema class files
authorGalen Charlton <gmc@esilibrary.com>
Mon, 14 Oct 2013 21:35:11 +0000 (21:35 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 14 Oct 2013 21:35:11 +0000 (21:35 +0000)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Koha/Schema/Result/Borrower.pm
Koha/Schema/Result/PatronList.pm
Koha/Schema/Result/PatronListPatron.pm

index 3fe4362..9ddc63b 100644 (file)
@@ -801,6 +801,36 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
+=head2 patron_list_patrons
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::PatronListPatron>
+
+=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<Koha::Schema::Result::PatronList>
+
+=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_instructors> -> 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
index 8d1d9dc..3864f13 100644 (file)
@@ -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<patron_lists>
 
 =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</patron_list_id>
 
-Related object: L<Koha::Schema::Result::PatronListPatron>
+=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<Koha::Schema::Result::PatronListPatron>
+
+=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
index cb7ee6b..441d7a4 100644 (file)
@@ -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<patron_list_patrons>
 
 =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</patron_list_patron_id>
+
+=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