@@ -, +, @@ --- Koha/Schema/Result/Borrower.pm | 19 +++++++++++++++++-- Koha/Schema/Result/OpacNews.pm | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 4 deletions(-) --- a/Koha/Schema/Result/Borrower.pm +++ a/Koha/Schema/Result/Borrower.pm @@ -902,6 +902,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 opac_news + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "opac_news", + "Koha::Schema::Result::OpacNews", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 patron_list_patrons Type: has_many @@ -1138,8 +1153,8 @@ Composing rels: L -> ordernumber __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-10-06 10:38:42 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AdaMeazHWWCtMM7rvKX9Lg +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-10-21 19:50:05 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QafovaRBnm36nyoyQTGIgQ # You can replace this text with custom content, and it will be preserved on regeneration --- a/Koha/Schema/Result/OpacNews.pm +++ a/Koha/Schema/Result/OpacNews.pm @@ -75,6 +75,12 @@ __PACKAGE__->table("opac_news"); data_type: 'integer' is_nullable: 1 +=head2 borrowernumber + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 1 + =cut __PACKAGE__->add_columns( @@ -104,6 +110,8 @@ __PACKAGE__->add_columns( { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "number", { data_type => "integer", is_nullable => 1 }, + "borrowernumber", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, ); =head1 PRIMARY KEY @@ -120,6 +128,26 @@ __PACKAGE__->set_primary_key("idnew"); =head1 RELATIONS +=head2 borrowernumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "borrowernumber", + "Koha::Schema::Result::Borrower", + { borrowernumber => "borrowernumber" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "SET NULL", + on_update => "CASCADE", + }, +); + =head2 branchcode Type: belongs_to @@ -141,8 +169,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07025 @ 2014-02-16 23:15:22 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/q+riAqsYmCQkUCUL9MU7g +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-10-21 19:50:05 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QivH1Daozdp0BttbPF6CkA # You can replace this text with custom content, and it will be preserved on regeneration --