Bug 25042 - Koha::Schema::Result::Reserve redefines item and biblio rs
Summary: Koha::Schema::Result::Reserve redefines item and biblio rs
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 11703
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-02 12:57 UTC by Jonathan Druart
Modified: 2020-11-30 21:44 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2020-04-02 12:57:11 UTC
From:

commit 82275fa2db63b7d2358897aad72b845a73cb8bda
    Bug 11703 - Convert checkouts table to ajax datatable

It adds 2 belongs_to, item and biblio. But they already exist (as the FKs exist)

+__PACKAGE__->belongs_to(
+  "item",
+  "Koha::Schema::Result::Item",
+  { itemnumber => "itemnumber" },
+  {
+    is_deferrable => 1,
+    join_type     => "LEFT",
+    on_delete     => "CASCADE",
+    on_update     => "CASCADE",
+  },
+);
 
+__PACKAGE__->belongs_to(
+  "biblio",
+  "Koha::Schema::Result::Biblio",
+  { biblionumber => "biblionumber" },
+  {
+    is_deferrable => 1,
+    join_type     => "LEFT",
+    on_delete     => "CASCADE",
+    on_update     => "CASCADE",
+  },
+);

This code needs to be removed.
Comment 1 Jonathan Druart 2020-04-08 07:25:48 UTC
It was actually a rename.

Reserve.pm:
 default:
  * itemnumber
  * biblionumber
 new:
  * item
  * biblio

Issue.pm:
 default:
  * itemnumber
 new:
  * item
  * branch (missing FK?)