title: InsertOnSubmit doesn't attach?
body: <p>After creating a new object (Foo), I set the key (BarId) for an EntityRef association property (Bar).  I then want to insert the new object into the database, and be able to access the lazy-loaded child object afterward.</p>
  
  <p>Unfortunately, the lazy-loading property returns null after the call to InsertOnSubmit().  It returns the correct object if I instead Attach() the object to the data context, however.</p>
  
  <p><em>Here's code that successfully inserts my new object into the database, but doesn't correctly setup lazy-loading for the child Bar property:</em></p>
  
  <pre><code>var foo = new Foo();
  foo.BarId = 123;
  context.GetTable&lt;Foo&gt; ().InsertOnSubmit( foo );
  foo.Bar.Something();    // throws NullReferenceException
  </code></pre>
  
  <p><em>Here, the Bar object is properly loaded:</em></p>
  
  <pre><code>var foo = new Foo();
  foo.BarId = 123;
  context.GetTable&lt;Foo&gt; ().Attach( foo );
  foo.Bar.Something();    // method is called on lazy-loaded Bar object
  </code></pre>
  
  <p>Calling Attach before InsertOnSubmit causes the latter to throw a "Cannot add an entity that already exists" exception.</p>
  
  <p>So, is this a bug in LINQ-to-SQL, where inserted objects are not properly attached to the data context?</p>
  
  <p>How do I fix this?</p>