+++ 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.
Should we remove Koha::Objects->find_or_create? There are very few occurrences so far.
(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.
> 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)