title: NHibernate: Error when saving Bag with NOT-Nullable Constraint
body: <p>Given are tables Item and ItemTranslation where the latter has a <strong>NOT-Nullable</strong> foreign key on Item.</p>
  
  <p>ItemTranslation.hbm.xml only has its properties Text and LanguageCode, it does <strong>NOT map Item</strong>.</p>
  
  <p>Item.hbm.xml:</p>
  
  <pre><code>&lt;bag name="Translations" cascade="all-delete-orphan"&gt;
    &lt;key column="ItemID" /&gt;
    &lt;one-to-many class="ItemTranslation, SomeNamespace" /&gt;
  &lt;/bag&gt;
  </code></pre>
  
  <p>Now when I do the following:</p>
  
  <pre><code>Item item = new Item();
  item.Translations.Add( new ItemTranslation { LanguageCode = "DE", Text = "Test DE" } );
  item.Translations.Add( new ItemTranslation { LanguageCode = "EN", Text = "Test EN" } );
  item.Save();
  </code></pre>
  
  <p>NHibernate throws the following exception:</p>
  
  <pre><code>System.Data.SqlClient.SqlException : Cannot insert the value NULL into column 'ItemID', table 'someDb.dbo.ItemTranslation'; column does not allow nulls. INSERT fails.
  Cannot insert the value NULL into column 'ItemID', table 'someDb.dbo.ItemTranslation'; column does not allow nulls.
  </code></pre>
  
  <p>I could fix it either by mapping ItemID as many-to-one in IssuedItemTranslation.hbm.xml or making the column NULLable.</p>
  
  <p>But both ways are kind of ugly.</p>
  
  <p>Is there any other possibility? Maybe with some change in the bag-mapping?</p>
  
  <p>Thank you in advance.</p>