hi friend, i m new in hibernate. now i have a problem. in my application i m passing key in bag to get the value in list(financialPeriodList) from the class FinancialPeriod.now i want one more key from which i get the value in the list for exa. FINYEARID and orgStructure.data should be filter fron these two condition in FinancialPeriod class. <class name="FinancialYear" table="FINYEAR"> <id name="financialYearId" column="FINYEARID"> <generator class="assigned"/> </id> <property name="description" column="DESCRIPTION" /> <property name="yearStartDate" column="STARTDATE" /> <property name="yearEndDate" column="ENDDATE" />
<property name="lock" column="ISCLOSED" type="true_false"/> <property name="isActive" column="ISACTIVE" type="true_false"/> <property name="financialPeriodType" column="FINANCIALPERIODTYPE" /> <property name="orgStructure" column="ORGSTRUCTCODE" />
<bag name="financialPeriodList" lazy="false" cascade="all,delete-orphan"> <key column="FINYEARID" foreign-key="FINYEARID" not-null="true" update="false" /> <one-to-many class="FinancialPeriod" /> </bag> </class>
<class name="FinancialPeriod" table="FINYEARPERIODS"> <id name="periodId" column="PERIODNUMBERID"> <generator class="uuid.hex"/> </id> <property name="periodStartDate" column="PERIODSTARTDATE" /> <property name="periodEndDate" column="PERIODENDDATE" /> <property name="orgcode" column="ORGSTRUCTCODE" /> <property name="locked" column="ISLOCKED" type="true_false" /> <property name="finyear2" column="FINYEARID" /> </class>
|