-->
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: hbm config where clause with select query
PostPosted: Tue Feb 26, 2013 6:50 pm 
Newbie

Joined: Tue Feb 26, 2013 6:43 pm
Posts: 1
I have a hbm config file in which there is a where clause inside set that requires a select query. I would like to know how DB schema has to be provided for the select query inside the where clause.

<set name="pdAddresses" inverse="true" lazy="true" where=" ADDRESS_CD in ('M','O','R') and ADDR_EFF_DT &lt;= CURRENT DATE and (CURRENT DATE &lt;= ADDR_EXP_DT or ADDR_EXP_DT is null) and CREATION_TMSTMP = (select max(add1.CREATION_TMSTMP) from $$SCHEMA.PD_ADDRESS add1 where add1.producer_num = producer_num and add1.address_cd = address_cd and add1.ADDR_EFF_DT = ADDR_EFF_DT) " >
<key>
<column name="PRODUCER_NUM" />
<column name="LEGACY_NUM"/>
</key>
<one-to-many class="com.test.PdAddress" />
</set>

Thanks in advance for the help.


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.