I've determined a great deal about nhibernate, but this appears to become my final hurdle of lacking the knowledge of what's going on. So this is actually the problem.

I've got a fundamental databas structure:

Shows:
ID [Pk]
CountryID [Fk]
Name

Countries:
ID [Pk]
Name

CountryID includes a foriegn key reference from shows to nations table primary key, and nations has already been populated with preset values which will rarely change.

Here's my Mapping Files

    public ShowMap()
    {
        Table("Shows");

        Id(x => x.ID);
        Map(x => x.Name)

        HasOne<Country>(x => x.CountryOrigin)
            .Cascade.All()
            .ForeignKey("CountryID");
    }

    public CountryMap()
    {
        Table("Countries");

        Id(x => x.ID);
        Map(x => x.Name);
    }

I'm almost sure it's a mapping problem, however when I actually do an place into shows and I've got a country mounted on it. It attempts to place a brand new country in to the database rather than utilizing an existing one out of the database already. Which appears to become the primary problem. I'm not sure how you can do an place correctly where it uses a current record within the DB.

Finally, here's a good example of me attempting to do an place not know really how to proceed.

        using (var tx = _session.BeginTransaction())
        {

            Show s1 = new Show();
            s1.CountryOrigin = new Country { ID = 2, Name = "Japan" };
            s1.Name = "Liar Game";

            _session.SaveOrUpdateCopy(s1);
            tx.Commit();
            tx.Dispose();
            return true;
        }

So now you ask , how do i place a brand new show and also have it reference a current record within the nations table?


Update 1 I've reworked it to utilize a has numerous relationship because I had been reading through that the has one most likely is not the proper way to go. Have same issue, this is actually the code changes. These also reflect code alterations in comments.

Insertion Code:

        using (var tx = _session.BeginTransaction())
        {

            Show s1 = new Show();
            s1.CountryOrigin.Add(_session.Get<Country>(2));
            s1.Name = "Liar Game";

            _session.SaveOrUpdateCopy(s1);
            tx.Commit();
            return true;
        }

Mappings:

    public ShowMap()
    {
        Table("Shows");

        Id(x => x.ID);
        Map(x => x.Name)

        HasMany<Country>(x => x.CountryOrigin)
            .KeyColumn("ID")
            .Cascade.SaveUpdate();
    }

    public CountryMap()
    {
        Table("Countries");

        Id(x => x.ID);
        Map(x => x.Name);
    }

Still obtaining the cannot place null into CountryID like was pointed out within the comments.

Update 2 Doing a bit of a little of testing/debugging the:

            s1.CountryOrigin.Add(_session.Get<Country>(2));

Does what it's designed to do and will get the right country, the main problem happens on place. Which means this makes me believe it is more mapping problem.

You've got a one-to-many relationship between country and show with show around the many side. So Country ought to be planned using References:

public ShowMap()
{
    Table("Shows");

    Id(x => x.ID);
    Map(x => x.Name)

    References(x => x.CountryOrigin, "CountryID");
}

You should utilize Session.Load to obtain your Country object:

s1.CountryOrigin = _session.Load<Country>(2);

Session.Load states "I understand that the record is available within the db with this particular ID. Produce a proxy of this object for me personally, without disturbing to visit the database". You might use Session.Get, but that will create an additional db trip.