Enlightensoft's Blog

Helping in your each step

  • Categories

  • Authors

How to add where clouse into xml.hbm mapping file

Posted by Pankil Patel on November 13, 2011

For many-to-one:

<many-to-one name=”rankTypeLookupData”
formula=”(SELECT l.LKP_ID FROM EQ_LOOKUP_DATA l WHERE l.DROPDOWN_CODE = ‘BV_STAFF_RANK_TYPE’ AND l.LKP_KEY = INDVL_RANK_TYPE)”
class=”com……LookupData” not-found=”ignore”>
<column name=”INDVL_RANK_TYPE” />
</many-to-one>

For one-to-many:

<set name=”regionList” table=”BV_REGION” cascade=”all” fetch=”join”
outer-join=”true” where=”DEL_IN = ‘N'” inverse=”true”>
<key column=”INDVL_RANK_ID” />
<one-to-many
class=”com……..StaffTeamRankRegion” />
</set>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: