title: Fluent NHibernate : How to map a 'Foreign Key' column in the mapping class
body: <p>I'm starting to develop with Fluent NHiberate, and I was wondering how I create a defined 'Foreign Key' relationship in my Mapping class.</p>
  
  <p>Here's my class.  These classes are a one-to-one with associated tables.</p>
  
  <pre><code>public class Song
  {
      public virtual int SongID{ get; private set; } //Primary Key
      public virtual int SongArtistID { get; set; } //Foreign Key mapping to 'Artist.ArtistID'
      public virtual string Title { get; set; }
  }
  
  public class Artist
  {
      public virtual int ArtistID{ get; private set; } //Primary Key
      public virtual int ArtistName{ get; set; }
  }
  
  public class SongMapping : ClassMap&lt;Song&gt;
  {
      SongMapping()
      {
          Id(c =&gt; c.SongID);//.GeneratedBy.HiLo("sermon"); is HiLo generator good?
          Map(c =&gt; c.SermonArtistID).Not.Nullable(); //How is this mapped to 'Artist.ArtistID'??
          Map(c =&gt; c.Title).Not.Nullable().Length(50);
      }
  }
  </code></pre>
  
  <p>In my mapping file, I want to create a defined foreign key relationship in my Song class SongArtistID column, which will define a foreign key to the ArtistID column in the Artist table/class.</p>