title: Nhibernate - Getting two object type in repository return result
body: <p>I have two class BookingInfo.cs and BookingTransaction class.  </p>
  
  <pre><code>  public class BookingInfo
      {
        public virtual string Code { get; set; }
      }
  
    public class BookingTransaction : BookingInfo   {
          public virtual string CustomerRefNo { get; set; }
       }
  </code></pre>
  
  <p>below is the NHibernate mapping for both classes</p>
  
  <pre><code>   public class BookingInfoConfiguration : ClassMap&lt;BookingInfo&gt; {
              public BookingInfoConfiguration() {
                  Table("Bkg_BookingInfo");
                  LazyLoad();
                  DynamicUpdate();
                  Id(x =&gt; x.Id).GeneratedBy.GuidComb().UnsavedValue(Guid.Empty);
          }
      }
  
        public class BookingTransactionConfiguration : 
       ClassMap&lt;BookingTransaction&gt; {
              public BookingTransactionConfiguration() {
                  Table("Bkg_BookingInfo");
                  LazyLoad();
                  DynamicUpdate();
                  Id(x =&gt; x.Id).GeneratedBy.GuidComb().UnsavedValue(Guid.Empty);
      }
  }
  </code></pre>
  
  <p>Now i am querying to get rows from database.</p>
  
  <pre><code> CurrentSession.Query&lt;BookingInfo&gt;().ToList();
  </code></pre>
  
  <p>I get two items for single row in database table. one for <strong>Bookinginfo</strong> and another for <strong>BookingTransaction</strong>. but i want to get only result of type Bookinginfo.</p>
  
  <p>How to remove the items of the child class from the result?</p>