title: UPDATE columns in one-to-many related tables
body: <p>Suppose you have a <code>table A</code> related to another <code>table B</code> by a <code>one-to-many</code> (<code>hasMany</code>) relation. <code>Table B</code> can have other <code>hasMany</code> relations and so on.</p>
  
  <p>For instance, I am trying to do it in cakePhp, but I think it is a general SQL problem.
  Suppose that in every table there is a column, <code>user_id</code>.</p>
  
  <p>There is a way to update all the columns <code>user_id</code> in all related <code>table</code> with one <code>SQL construct</code>? Or rather, which is the fastest way to do it? Now, I could not find a solution but doing it by iteration, and, obviously this is quite time-consuming and server-overloading.</p>