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 <= CURRENT DATE and (CURRENT DATE <= 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.
|