https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690 --- Comment #101 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Martin Renvoize from comment #98)
Comment on attachment 113967 [details] [review] Bug 22690: Refactor merging of records to improve performance (Elasticsearch)
Review of attachment 113967 [details] [review]: -----------------------------------------------------------------
::: Koha/Item.pm @@ +1064,5 @@
+sub item_orders { + my ( $self ) = @_; + + my $orders = $self->_result->item_orders; + return Koha::Acquisition::Orders->_new_from_dbic($orders);
In it's current form, this can result in failure.. I'm not seeing any handling for that...
i.e. if an item is deleted it gets moved to deleted_items but the itemnumber remains in the aqorder_items table as there is no foreign key constraint.. have you tested this case?
Not sure I understand what error possibility you see here. Koha::Item is only for existing items? So if you have an Koha::Item object it must have itemnumber, no? -- You are receiving this mail because: You are watching all bug changes.