@@ -, +, @@ --- Koha/Schema/Result/Biblio.pm | 37 +++++----------- Koha/Schema/Result/Borrower.pm | 49 +++++++-------------- Koha/Schema/Result/Branch.pm | 34 +++++++------- Koha/Schema/Result/ClubHoldsToPatronHold.pm | 10 ++--- Koha/Schema/Result/Desk.pm | 12 ++--- Koha/Schema/Result/Item.pm | 49 +++++++-------------- Koha/Schema/Result/Itemtype.pm | 47 +++++++------------- 7 files changed, 89 insertions(+), 149 deletions(-) --- a/Koha/Schema/Result/Biblio.pm +++ a/Koha/Schema/Result/Biblio.pm @@ -300,32 +300,32 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 items +=head2 holds Type: has_many -Related object: L +Related object: L =cut __PACKAGE__->has_many( - "items", - "Koha::Schema::Result::Item", - { "foreign.biblionumber" => "self.biblionumber" }, + "holds", + "Koha::Schema::Result::Hold", + { "foreign.biblio_id" => "self.biblionumber" }, { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 old_reserves +=head2 items Type: has_many -Related object: L +Related object: L =cut __PACKAGE__->has_many( - "old_reserves", - "Koha::Schema::Result::OldReserve", + "items", + "Koha::Schema::Result::Item", { "foreign.biblionumber" => "self.biblionumber" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -345,21 +345,6 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 reserves - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "reserves", - "Koha::Schema::Result::Reserve", - { "foreign.biblionumber" => "self.biblionumber" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - =head2 reviews Type: has_many @@ -481,8 +466,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nmmsZusHYNAMimE9sImSNg +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-01-27 19:57:36 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4FwDh5Qc6HTepwRlo7ivhQ __PACKAGE__->has_many( "biblioitem", --- a/Koha/Schema/Result/Borrower.pm +++ a/Koha/Schema/Result/Borrower.pm @@ -1204,6 +1204,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 holds + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "holds", + "Koha::Schema::Result::Hold", + { "foreign.patron_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 housebound_profile Type: might_have @@ -1414,21 +1429,6 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 old_reserves - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "old_reserves", - "Koha::Schema::Result::OldReserve", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - =head2 opac_news Type: has_many @@ -1534,21 +1534,6 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 reserves - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "reserves", - "Koha::Schema::Result::Reserve", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - =head2 return_claims_borrowernumbers Type: has_many @@ -1865,8 +1850,8 @@ Composing rels: L -> ordernumber __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Q9AXeEJckLl7CX6E40DUBw +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-01-27 19:57:36 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/2BwaVWoH8XxsDaSdKrSmg __PACKAGE__->add_columns( '+anonymized' => { is_boolean => 1 }, --- a/Koha/Schema/Result/Branch.pm +++ a/Koha/Schema/Result/Branch.pm @@ -631,6 +631,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 holds + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "holds", + "Koha::Schema::Result::Hold", + { "foreign.pickup_library_id" => "self.branchcode" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 illrequests Type: has_many @@ -796,21 +811,6 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 reserves - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "reserves", - "Koha::Schema::Result::Reserve", - { "foreign.branchcode" => "self.branchcode" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - =head2 special_holidays Type: has_many @@ -887,8 +887,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Uu8m3hyDhM50oTSeNTJbdg +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-01-27 19:57:36 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:scFksQ0UIScBex3j6VU8bw __PACKAGE__->add_columns( '+pickup_location' => { is_boolean => 1 } --- a/Koha/Schema/Result/ClubHoldsToPatronHold.pm +++ a/Koha/Schema/Result/ClubHoldsToPatronHold.pm @@ -127,14 +127,14 @@ __PACKAGE__->belongs_to( Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( "hold", - "Koha::Schema::Result::Reserve", - { reserve_id => "hold_id" }, + "Koha::Schema::Result::Hold", + { id => "hold_id" }, { is_deferrable => 1, join_type => "LEFT", @@ -159,8 +159,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:47 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/T626DfqUi7SnXOyieUzYw +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-12-23 18:15:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+4gsVD0A0ycl+KrVzRmXCA sub koha_objects_class { 'Koha::Club::Hold::PatronHolds'; --- a/Koha/Schema/Result/Desk.pm +++ a/Koha/Schema/Result/Desk.pm @@ -89,24 +89,24 @@ __PACKAGE__->belongs_to( { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -=head2 reserves +=head2 holds Type: has_many -Related object: L +Related object: L =cut __PACKAGE__->has_many( - "reserves", - "Koha::Schema::Result::Reserve", + "holds", + "Koha::Schema::Result::Hold", { "foreign.desk_id" => "self.desk_id" }, { cascade_copy => 0, cascade_delete => 0 }, ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7qeCP25arGQpM4xxnTmWbw +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-01-27 19:57:36 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PkVcz/kbAu/zfbtztuJX9Q # You can replace this text with custom code or comments, and it will be preserved on regeneration --- a/Koha/Schema/Result/Item.pm +++ a/Koha/Schema/Result/Item.pm @@ -694,6 +694,21 @@ __PACKAGE__->belongs_to( }, ); +=head2 holds + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "holds", + "Koha::Schema::Result::Hold", + { "foreign.item_id" => "self.itemnumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 homebranch Type: belongs_to @@ -759,36 +774,6 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 old_reserves - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "old_reserves", - "Koha::Schema::Result::OldReserve", - { "foreign.itemnumber" => "self.itemnumber" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - -=head2 reserves - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "reserves", - "Koha::Schema::Result::Reserve", - { "foreign.itemnumber" => "self.itemnumber" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - =head2 return_claims Type: has_many @@ -850,8 +835,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:U5Tm2JfUnfhACRDJ4SpFgQ +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-01-27 19:57:36 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WuEFNsbl8eRji9xY1b2MdA __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); --- a/Koha/Schema/Result/Itemtype.pm +++ a/Koha/Schema/Result/Itemtype.pm @@ -242,47 +242,47 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 itemtypes +=head2 holds Type: has_many -Related object: L +Related object: L =cut __PACKAGE__->has_many( - "itemtypes", - "Koha::Schema::Result::Itemtype", - { "foreign.parent_type" => "self.itemtype" }, + "holds", + "Koha::Schema::Result::Hold", + { "foreign.item_type" => "self.itemtype" }, { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 itemtypes_branches +=head2 itemtypes Type: has_many -Related object: L +Related object: L =cut __PACKAGE__->has_many( - "itemtypes_branches", - "Koha::Schema::Result::ItemtypesBranch", - { "foreign.itemtype" => "self.itemtype" }, + "itemtypes", + "Koha::Schema::Result::Itemtype", + { "foreign.parent_type" => "self.itemtype" }, { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 old_reserves +=head2 itemtypes_branches Type: has_many -Related object: L +Related object: L =cut __PACKAGE__->has_many( - "old_reserves", - "Koha::Schema::Result::OldReserve", + "itemtypes_branches", + "Koha::Schema::Result::ItemtypesBranch", { "foreign.itemtype" => "self.itemtype" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -307,24 +307,9 @@ __PACKAGE__->belongs_to( }, ); -=head2 reserves - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "reserves", - "Koha::Schema::Result::Reserve", - { "foreign.itemtype" => "self.itemtype" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iByLvz6PwhMByZC9bJb8ig +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-01-27 19:57:36 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0UMD6Is/qWhwz3LZxiRibA __PACKAGE__->add_columns( '+rentalcharge_hourly_calendar' => { is_boolean => 1 }, --