title: Ignoring soft foreign keys when referenced row no longer exists
body: <p>I’m presently working with a NHibernate application that contains table <em>A</em> that once had a foreign key reference to another related table <em>B</em>. This constraint has since been purposely removed as items in <em>B</em> may be deleted out of my control by a secondary application.</p>
  
  <p>Though the constraint is now gone the reference from <em>A</em> to <em>B</em> can still be considered useful if the row in <em>B</em> still exists, otherwise it may be treated a null.</p>
  
  <p>If a row is deleted from <em>B</em> that is referenced by <em>A</em>, quite rightly, an exception is thrown stating that "No row with the given identifier exists". </p>
  
  <p>Is there a way to fluently (or otherwise avoiding explicit queries/joins) to have the object reference return null by the application in the case of a reference from <em>A</em> no longer existing in <em>B</em>, but returning the object as described by <em>B</em> if the reference is valid?</p>
  
  <p>The current unidirectional fluent mapping (treated as a foreign key reference) is rather straight forward looking like</p>
  
  <pre><code>...
  References(a =&gt; a.b_ref, "b_id");
  ...
  </code></pre>