title: NHibernate / ActiveRecord: How to set foreign key without getting entire object?
body: <p>Let's say I've got the following ActiveRecord class:</p>
  
  <pre><code>[ActiveRecord]
  public class Account
  {
      ...
  
      [BelongsTo("CustomerId")]
      public Customer Customer { get; set; }
  }
  </code></pre>
  
  <p>Currently, to set the value of the CustomerId field I have to get the entire Customer object from the database and assign it to the Account:</p>
  
  <pre><code>Customer customer = Customer.FindById(1);
  account.Customer = customer;
  </code></pre>
  
  <p>This isn't very efficient. I'd rather set the value of CustomerId field directly without round-tripping the database, e.g.</p>
  
  <pre><code>account.CustomerId = 1;
  </code></pre>
  
  <p>What's the correct way to do this?</p>