title: not-null property references a null or transient value
body: <p>I'm using NHibernate and I have a problem, because when trying to save to a database it throws an exception:</p>
  
  <blockquote>
    <p>not-null property references a null or transient value NHibernate.Entities.Question.Test</p>
  </blockquote>
  
  <p>How can I change it?</p>
  
  <pre><code>public class TestMap: ClassMap&lt;Test&gt;
  {
      public TestMap()
      {
          Table("Test");
  
          Id(x =&gt; x.Id)
              .GeneratedBy.Identity()
              .Column("Id");
  
          Map(x =&gt; x.Name)
              .Column("Name")
              .Not.Nullable();
  
          HasMany(x =&gt; x.Question).KeyColumn("TestId")
           .Cascade.All()
          .Not.LazyLoad();
      }
  }
  
  public class QuestionMap: ClassMap&lt;Question&gt;
  {
      public QuestionMap()
      {
          Table("Question");
  
          References(x =&gt; x.Test)
              .Column("TestId")
              .Not.Nullable()
              .Cascade.SaveUpdate()
              .Not.LazyLoad();
  
          Id(x =&gt; x.Id)
              .GeneratedBy.Identity()
              .Column("Id");
  
          Map(x =&gt; x.QuestionContent)
              .Column("QuestionContent")
              .Not.Nullable();
  
          HasMany(x =&gt; x.Answer)
              .KeyColumn("QuestionId")
              .Cascade.All()
          //.Cascade.SaveUpdate()
          .Not.LazyLoad();
      }
  }
  </code></pre>
  
  <p>EDIT: class</p>
  
  <pre><code>public class Question: Entity
  {
      public Question()
      {
          Answer = new List&lt;Answer&gt;();
      }
      public virtual string QuestionContent { get; set; }
      public virtual IList&lt;Answer&gt; Answer { get; set; }
      public virtual Test Test { get; set; }
  
      public virtual void AddAnswer(Answer answer)
      {
          answer.Question = this;
          Answer.Add(answer);
      }
  }
  
  public class Test : Entity
  {
      public Test()
      {
          Question = new List&lt;Question&gt;();
      }
  
      public virtual string Name { get; set; }
      public virtual IList&lt;Question&gt; Question { get; set; }
  
      public virtual void AddQuestion(List&lt;Question&gt; questions)
      {
          foreach (var question in questions)
          {
              question.Test = this;
              Question.Add(question);
          }
      }
  }
  </code></pre>
  
  <p>Question has Answer, Answer has GivenAnswer and GivenAnswer has SolvedTest. I have no idea what could be wrong.</p>