title: CakePHP 3.0: How to check execution of query builder updating data
body: <p>I'm using cakePHP 3.0 for back-end API. This is my code.</p>
  
  <pre><code>namespace App\Controller;
  
  use Cake\Datasource\ConnectionManager;
  use Cake\ORM\TableRegistry;
  use App\Controller\AppController;
  use Cake\Routing\Router;
  
  class MainController extends AppController {
  
     public function myMethod() {
         $groupRegistry = TableRegistry::get('MyModel');
         $query = $groupRegistry-&gt;query();
         $params = $this-&gt;request-&gt;data;
  
         $return = $query-&gt;update()
                 -&gt;set(['my_flag' =&gt; $params['flag']])
                 -&gt;where(['id' =&gt; $params['id']])
                 -&gt;execute();
  
         if (empty($return)) {
             return $this-&gt;outStatusJson('ERR100', 'Error Updating.');
         }
  
       return $this-&gt;outStatusJson('0', 'OK');
    }
  }
  </code></pre>
  
  <p>I cannot track the responce of <strong>$query->update()</strong></p>
  
  <p>Any help will save my day.</p>