https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40855

            Bug ID: 40855
           Summary: Standard backend uses plain SQL
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: ILL
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected],
                    [email protected], [email protected]

The edititem() method in the Standard ILL backend uses raw SQL queries with
manual delete-all-and-recreate patterns instead of leveraging Koha's ORM.

This approach creates several problems: it bypasses ORM validation and
relationships, uses inefficient delete-all-then-insert operations that update
unchanged attributes, includes complex conditional SQL based on column
existence checks [1], and makes the code harder to maintain and debug. The
method contains over 40 lines of raw SQL that could be replaced with a single
call to add_or_update_attributes() (from bug 40850), which would be more
efficient (only updating changed values), safer (using ORM validation), more
maintainable (no raw SQL).

[1] For backwards compatibility with older Koha versions? Inherited from the
time it was an external backend.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to