title: NHibernate Bag collection is empty
body: <p>I have a strange plroblem when i try to use NHibernate bag</p>
  
  <p>mappings</p>
  
  <pre><code>&lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="FMG.APO.Dao.Domain" assembly="FMG.APO.Dao"&gt;
      &lt;class name="Constraint" table="rConstraintItems" lazy="false"&gt;
          &lt;id name="Id" type="Int32" unsaved-value="0"&gt;
              &lt;column name="ConstraintItemID" sql-type="int" not-null="true"  /&gt;
              &lt;generator class="native" /&gt;
          &lt;/id&gt;
          &lt;many-to-one name="ConstraintGroup" class="ConstraintGroup"&gt;
              &lt;column name="ConstraintGroupID" sql-type="int" not-null="false" /&gt;
          &lt;/many-to-one&gt;
  
          &lt;many-to-one name="Fund" class="Fund"&gt;
              &lt;column name="FundID" sql-type="int" not-null="true" /&gt;
          &lt;/many-to-one&gt;
          &lt;property name="LowerLimit" type="double"&gt;
              &lt;column name="LowerLimit" sql-type="decimal" not-null="true"/&gt;
          &lt;/property&gt;
          &lt;property name="UpperLimit" type="double"&gt;
              &lt;column name="UpperLimit" sql-type="decimal" not-null="true"/&gt;
          &lt;/property&gt;
          &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>class</p>
  
  <p>private int id;</p>
  
  <pre><code>public Constraint() { }
  public Constraint(Fund fund, double lowerLimit, double upperLimit)
  {
      this.fund = fund;
      this.lowerLimit = lowerLimit;
      this.upperLimit = upperLimit;
  }
  
  public int Id
  {
      get { return id; }
      set { id = value; }
  }
  
  private Fund fund;
  
  public Fund Fund
  {
      get { return fund; }
      set { fund = value; }
  }
  
  private ConstraintGroup constraintGroup;
  public ConstraintGroup ConstraintGroup
  {
      get { return constraintGroup; }
      set { constraintGroup = value; }
  }
  
  private double lowerLimit;
  
  public double LowerLimit
  {
      get { return lowerLimit; }
      set { lowerLimit = value; }
  }
  private double upperLimit;
  
  public double UpperLimit
  {
      get { return upperLimit; }
      set { upperLimit = value; }
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>&lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="FMG.APO.Dao.Domain" assembly="FMG.APO.Dao"&gt;
      &lt;class name="ConstraintGroup" table="rConstraintGroups" lazy="false"&gt;
          &lt;id name="Id" type="Int32" unsaved-value="0"&gt;
              &lt;column name="ConstraintGroupID" sql-type="int" not-null="true"  /&gt;
              &lt;generator class="native" /&gt;
          &lt;/id&gt;
          &lt;property name="PlanID" type="Int32"&gt;
              &lt;column name="PlanID" sql-type="int" not-null="true"/&gt;
          &lt;/property&gt;
          &lt;property name="GroupDescr" type="String"&gt;
              &lt;column name="GroupDescr" length="100" sql-type="nvarchar"/&gt;
          &lt;/property&gt;
          &lt;bag name="Constraints" inverse="true" lazy="true" cascade="all"&gt;
              &lt;key column="ConstraintGroupID"/&gt;
              &lt;one-to-many class="Constraint" /&gt;
          &lt;/bag&gt;
      &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>class </p>
  
  <pre><code> public class ConstraintGroup
      {
   private int id;
  
      public int Id
      {
          get { return id; }
          set { id = value; }
      }
  
      private int planID;
  
      public int PlanID
      {
          get { return planID; }
          set { planID = value; }
      }
      private string groupDescr;
  
      public string GroupDescr
      {
          get { return groupDescr; }
          set { groupDescr = value; }
      }
  
  
      protected IList&lt;Constraint&gt; constraints;
      public IList&lt;Constraint&gt; Constraints
      {
          get
          {
              if (constraints == null)
              {
                  constraints = new List&lt;Constraint&gt;();
              }
              return constraints;
          }
          set { constraints = value; }
      }
  }
  </code></pre>
  
  <p>I have 2 identical data bases(I have repeatedly checked and compare them). the bag is populated om my test database but it is empty on my production database. can somebody help me to figure this out? I am really stuck</p>