title: Get field value before delete it
body: <p>I have two table categories ( hierarchical structure ) and attachment that have relations together.</p>
  
  <pre><code>delete  from category where lft between @left and @right; 
  </code></pre>
  
  <p>and I want to delete from attachment which is related by those category !</p>
  
  <p>What should I do?</p>