Hibernate Mapping: I have table called company and employee. company has list of employees 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.. Please any one help me.......
<class >
<id name="company_id" type="java.lang.String">
<column name="COMPANY_ID" />
<generator class="assigned" />
</id>
<property name="name" type="java.lang.String">
<column name="NAME" not-null="true"/>
</property>
.
.
.
<list name="employees"
table="employee"
fetch="join"
cascade="all">
<key column="company_id"/>
<list-index column="INDEX_IN_COMPANY"/>
<one-to-many class="com....Employee" />
</list>
</class >