Using query builder to write custom queries like insert, will the usual callbacks still get triggered in CakePHP 3.x? -


I was reading through

when I myself was thinking that normal callbacks such as Model . If $ query = $ article-> Query (); $ Query-> Update () - & gt; Set (['published' = & gt; true]) - & gt; Where (['id' = & gt; $ id]) - & gt; carry about ();

What should I do if I want to trigger callback while using Query Builder to not update it and I still want to?

The reason for this is that I want to update

Text "itemprop =" text ">

How to trigger a callback using only one record is a way to manually update and save each update:

  $ Query = $ article- & gt; Queries () - & gt; where (...); Foreign Currency ($ Query $ as entity) {$ entity- & gt; Published = true; $ Articles- & gt; Save ($ unit); }  

Comments