title: Rails ActiveRecord - get belongs_to association with lock
body: <p>I would like to retrieve a belongs_to association and acquire a database lock on its object.</p>
  
  <pre><code>&gt; character.team.lock!
  ActiveRecord::Base -- Team Load -- { :sql =&gt; "SELECT  `teams`.* FROM `teams` WHERE `teams`.`id` = 1 LIMIT 1" }
  ActiveRecord::Base -- Team Load -- { :sql =&gt; "SELECT  `teams`.* FROM `teams` WHERE `teams`.`id` = 1 LIMIT 1 FOR UPDATE" }
  </code></pre>
  
  <p>Above runs two queries, which technically makes sense - <code>character.team</code> loads the team, then <code>team.lock!</code> selects once more with <code>FOR UPDATE</code>.</p>
  
  <p>The question is - how can I make it issue only one query?</p>