Bug 21761 - Koha::Object supports passing through 'update' which means we can side step 'set' + 'store'
Summary: Koha::Object supports passing through 'update' which means we can side step '...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P1 - high critical (vote)
Target Milestone: ---
Assignee: Bugs List
QA Contact: Testopia
Depends on:
Reported: 2018-11-05 11:43 UTC by Martin Renvoize
Modified: 2019-02-01 11:34 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2018-11-05 11:43:45 UTC
If we're adding triggers at the code level all over the place by overloading the store method we need to never ever let dbic handle it.. by allowing the 'update' method through we are exposing ourselves to places in the codebase skipping the store triggers.
Comment 1 Jonathan Druart 2018-11-06 15:44:02 UTC
Indeed, I think we should fix it at Koha::Object level (once again), but on top of bug 21610.
We could move the handle of default values to a specific (private) method and call it with get_dirty_columns on ->store, ->update or ->set.
Comment 2 Marcel de Rooy 2018-11-06 15:47:48 UTC
We should replace the remaining DBIx code fragments scattered here and there..
Comment 3 Tomás Cohen Arazi 2019-02-01 11:34:26 UTC
I agree we should either remove it from AUTOLOAD or write our own as a wrapper on top of the class's ->store.