title: How to have manage sub Transactions or nested transactions?
body: <p>I want to have something like sub-transactions, in that you can mark a point where you would start the sub-transaction, then at the point of descision for that bit, you can either roll-back (abort the sub-bit) or carry on, effectively commiting, when the out transation commits. Of course, if you abort the outer transaction, the marked bit aborts too.</p>
  
  <p>How can I do that with NHibernate but the transaction is being closed during the fisrt commit and thus i`m having the error message </p>
  
  <blockquote>
    <p>no open transaction to commit</p>
  </blockquote>
  
  <p>My code is as follows:</p>
  
  <pre><code>API.Data.Session session = API.Data.SessionManager.GetSession();
          session.BeginTransaction();
           try
          {
              Project project = Project.Load(ID);
              ...........
              Save(project);
              .....................
  
             session.CommitTransaction();
          }
           catch
           {
               session.RollbackTransaction();
               throw;
           }
  </code></pre>
  
  <hr>
  
  <pre><code>    public void save(Project project)
      {
  Data.SessionManager.GetSession().BeginTransaction();
                  try
                  {
                      Save();
                      LogIssueChange(test);
                      Data.SessionManager.GetSession().CommitTransaction();
                  }
                  catch
                  {
                      Data.SessionManager.GetSession().RollbackTransaction();
                      throw;
                  }
      }
  </code></pre>