title: CakePHP updateAll() not working
body: <p>I am using updateAll() instead of what a tutorial suggested</p>
  
  <p><code>$this-&gt;Post-&gt;id = $id;</code> </p>
  
  <p>I have no id column in my table. When I run this code - </p>
  
  <pre><code>    public function edit($user_id = null) {
      if (!$user_id) {
          throw new NotFoundException(__('Invalid post'));
      }
  
      $user_info = array('conditions' =&gt; array('User.user_ID' =&gt; $user_id));
      $user = $this-&gt;User-&gt;find('all', $user_info);
      if (!$user) {
          throw new NotFoundException(__('Invalid User ID'));
      }
  
      if ($this-&gt;request-&gt;is('put')) {
          $data = $this-&gt;request-&gt;input('json_decode');
          //$this-&gt;set('new_user', $data);
          $this-&gt;User-&gt;updateAll(
          array( 'User.status' =&gt; 'ooactive' ), //fields to update
          array( 'User.user_id' =&gt; $user_id ));
      }
  }
  </code></pre>
  
  <p>I get this error - </p>
  
  <blockquote>
    <p>Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ooactive' in 'field list'
    SQL Query: UPDATE <code>Smooch</code>.<code>users</code> AS <code>User</code> SET <code>User</code>.<code>status</code> = ooactive WHERE <code>User</code>.<code>user_id</code> = 3</p>
  </blockquote>
  
  <p>I do not know why I am getting this error any help would be awesome, thanks</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Current code, I decided it to do it the way shown from the blog tutorial at CakePHP.org - </p>
  
  <pre><code>    public function edit($user_id = null) {
      if (!$user_id) {
          throw new NotFoundException(__('Invalid post'));
      }
  
      $user_info = array('conditions' =&gt; array('User.user_ID' =&gt; $user_id));
      $user = $this-&gt;User-&gt;find('all', $user_info);
      if (!$user) {
          throw new NotFoundException(__('Invalid User ID'));
      }
  
      if ($this-&gt;request-&gt;is('put')) {
           $this-&gt;User-&gt;user_id = "user_id";
           $data = $this-&gt;request-&gt;input('json_decode');
           if($this-&gt;User-&gt;save($data));
      }}
  </code></pre>
  
  <p>ERROR - </p>
  
  <blockquote>
    <p>Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'
    SQL Query: INSERT INTO <code>Smooch</code>.<code>users</code> (<code>status</code>) VALUES ('inaaaaaaactive')</p>
  </blockquote>
  
  <p>This turns it into a INSERT statement, not sure why.</p>