[Bug 23187] New: Koha::Objects supports find_or_create without passing through the Koha::Object store method
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23187 Bug ID: 23187 Summary: Koha::Objects supports find_or_create without passing through the Koha::Object store method Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: critical Priority: P1 - high Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: dcook@prosentient.com.au, jonathan.druart@bugs.koha-community.org, koha-bugs@lists.koha-community.org, kyle@bywatersolutions.com, m.de.rooy@rijksmuseum.nl, martin.renvoize@ptfs-europe.com, testopia@bugs.koha-community.org, tomascohen@gmail.com Depends on: 21761 Blocks: 23185 Target Milestone: --- +++ This bug was initially created as a clone of Bug #21761 +++ 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 directly passing data to dbic's find_or_create method in Koha::Objects we are exposing ourselves to places in the codebase skipping the store triggers. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21761 [Bug 21761] Koha::Object supports passing through 'update' which means we can side step 'set' + 'store' https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23185 [Bug 23185] Koha::Objects supports passing through 'update' which means we can side step 'set' + 'store' -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23187 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |major -- You are receiving this mail because: You are on the CC list for the bug. You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23187 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Should we remove Koha::Objects->find_or_create? There are very few occurrences so far. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23187 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Jonathan Druart from comment #1)
Should we remove Koha::Objects->find_or_create? There are very few occurrences so far.
I reckon that's the most pragmatic approach.. it won't be too onerous to split the calls in two.. that's what happens behind the scenes in dbic land anyway. However.. do we use any of the create_related or multi-create functionality of dbic? That uses the internal find_or_create behind te scenes inside dbic. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23187 Bug 23187 depends on bug 21761, which changed state. Bug 21761 Summary: Koha::Object supports passing through 'update' which means we can side step 'set' + 'store' https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21761 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes. You are on the CC list for the bug. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23187 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=23185 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. You are on the CC list for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23187 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|23185 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23185 [Bug 23185] Koha::Objects supports passing through 'update' which means we can side step 'set' + 'store' -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23187 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> ---
Should we remove Koha::Objects->find_or_create? There are very few occurrences so far.
There are still occurrences of find_or_create in the codebase, so I believe this hasn't been resolved yet.(In reply to Jonathan Druart from comment #1) -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23187 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org