title: NHibernate: Column does not allow nulls. INSERT fails
body: <p>I have 2 entities Person and Address, Person has one Address.</p>
  
  <p><strong>EDIT: The Address already exists, Im just wanting to save the foreign key.</strong></p>
  
  <p>When I do this:</p>
  
  <pre><code>  PersonDTO person = new PersonDTO();
      person.Age = "Bob";
      person.Address = new AddressDTO {Key = 123};
      Save(person);
  </code></pre>
  
  <p>I get this exception:</p>
  
  <blockquote>
    <p>Cannot insert the value NULL into
    column 'Key', table 'Address'; column
    does not allow nulls. INSERT fails.The
    statement has been terminated.</p>
  </blockquote>
  
  <p>Mapping file fragment from Person</p>
  
  <pre><code>&lt;class name="PersonDTO" table="Person" xmlns="urn:nhibernate-mapping-2.2"&gt;
      &lt;id name="Key" column="PersonKey" type="Guid"&gt;
        &lt;generator class="guid" /&gt;
      &lt;/id&gt;
      &lt;one-to-one name="Address" class="AddressDTOl" /&gt;
    &lt;/class&gt;
  </code></pre>
  
  <p>I don't understand why this happens, im giving Address Key a value. Is my approach flawed?</p>