title: Parent instance is not bound to a Session; lazy load operation of attribute ’account’ cannot proceed
body: <p>While trying to do the following operation:</p>
  
  <pre><code>for line in blines:
      line.account = get_customer(line.AccountCode)
  </code></pre>
  
  <p>I am getting an error while trying to assign a value to <code>line.account</code>:</p>
  
  <pre><code>DetachedInstanceError: Parent instance &lt;SunLedgerA at 0x16eda4d0&gt; is not bound to a       Session; lazy load operation of attribute 'account' cannot proceed
  </code></pre>
  
  <p>Am I doing something wrong??</p>