title: Kohana ORM update column on save
body: <p>I'm fairly new to ORM, but what I am trying to do is insert a new comment in to the MySQL database and update users table.</p>
  
  <p>So I have two tables, <code>users</code> and <code>comments</code>.</p>
  
  <p>Now when i call <code>save()</code> method on comments object i would like to insert that comment in to <code>comments</code> table and also update user <code>written_comments</code> column in <code>users</code> table.</p>
  
  <p>The part where I only need to insert comment is easy and I've already done it.</p>
  
  <p>Problem comes with the update query where i need to update <code>users</code> table and set <code>written_comments + 1 where id = $userId</code></p>
  
  <p>I have found documentation about relations between objects, but i can't figure this out.</p>
  
  <p>I am using Kohana 3.3 version.</p>
  
  <p>My <code>comments</code> class right now is empty:</p>
  
  <pre><code>class Model_Comments extends ORM{
  
  }
  </code></pre>
  
  <p>And I'm extending Auth user class</p>
  
  <pre><code>class Model_User extends Model_Auth_User  {
  
  }
  </code></pre>
  
  <p>Any help at all would help a lot, thanks.</p>