title: How add constrain while mapping list in hibernate
body: <p>Hibernate Mapping:
  I have table called company and employee.
  company has list of employees
  <strong>In Employee table i have field called boolean:enable, Now, If enable=false means then the record should not added to the company employees list..How to do it..</strong>
  Please any one help me.......</p>
  
  <p></p>
  
  <pre><code>&lt;class &gt;
  &lt;id name="company_id" type="java.lang.String"&gt;
          &lt;column name="COMPANY_ID" /&gt;
          &lt;generator class="assigned" /&gt;
  &lt;/id&gt;
  &lt;property name="name" type="java.lang.String"&gt;
              &lt;column name="NAME" not-null="true"/&gt;
  &lt;/property&gt;
  .
  .
  .
  &lt;list name="employees"
                  table="employee"
                  fetch="join"
                  cascade="all"&gt;
                  &lt;key column="company_id"/&gt;
                  &lt;list-index column="INDEX_IN_COMPANY"/&gt;
                  &lt;one-to-many class="com....Employee" /&gt;
  
  &lt;/list&gt;
  &lt;/class &gt;
  </code></pre>
  
  <p></p>