-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: how to set one more key in bag
PostPosted: Mon Sep 24, 2012 6:28 am 
Newbie

Joined: Mon Sep 24, 2012 6:15 am
Posts: 1
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>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.